stavroskasidis / BlazorWithIdentity

A project template for a blazor hosted app using cookie based authentication with ef core identity.
MIT License
458 stars 106 forks source link

Will not get user details for user already logged in #3

Closed conficient closed 5 years ago

conficient commented 5 years ago

An issue with this library (good as it is!) is that the Username is only populated if the user logs in or registers using the API. The username isn't re-populated if the user is already logged in on returning.

However his royal Blazorness Steve Sanderson says that ClaimsPrincipal will be made available in a later version (see https://github.com/aspnet/AspNetCore/issues/4048)

stavroskasidis commented 5 years ago

Well, this is just a sample, but you are right. That is a bug for the client side. Could be easily fixed with an API call to get the user name

conficient commented 5 years ago

Good point, I'll queue an API call if IsLoggedOn returns true..

stavroskasidis commented 5 years ago

I pushed an update to the sample that case