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
254 stars 76 forks source link

Some small fixes in this great example #1

Open donwibier opened 5 years ago

donwibier commented 5 years ago

ApiAuthenticationStateProvider.MarkUserAsAuthenticated() receives the token instead of loginModel.Email.

This will generate an AuthenticatedUser including role claims etc. The ParseClaimsFromJwt has been changed to check if the roles claim contains an array and enumerate through the roles in the array instead of the check for '[' etc. While I was at it, I've updated to preview8 :-)