chrissainty / AuthenticationWithClientSideBlazor

Companion code sample for my blog post - Authentication with client-side Blazor using WebAPI and ASP.NET Core Identity
https://chrissainty.com/securing-your-blazor-apps-authentication-with-clientside-blazor-using-webapi-aspnet-core-identity/
MIT License
255 stars 76 forks source link

This codebase is no longer working #11

Open SpireTechnical opened 3 years ago

SpireTechnical commented 3 years ago

The sample project no longer works. It would be nice to get a workable example that will operate with the current released version of Blazor WebAssembly. Though, I must admit at this point, I don't feel Microsoft has a good handle on this solution.

vankampenp commented 3 years ago

@SpireTechnical It works for me with Core v5.04. I made some minor changes to adapt it to my application and to the latest Blazor hosted Webassembly template.

The only main change I made is rather than using

[Authorize] [ApiController]

I used: [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] [ApiController]

If you have a specific error or issue let me know. There is a pull request to update the code base to .NET 5