identity blazor
i have this code for getting user id of current user but its return null i use blazor wasm and web api
2 Replies
Do you need to use the AuthenticationStateProvider? See here:
https://learn.microsoft.com/en-us/aspnet/core/blazor/security/?view=aspnetcore-8.0#authenticationstateprovider-service
You don't typically use AuthenticationStateProvider directly. Use the AuthorizeView component or Task<AuthenticationState> approaches described later in this article. The main drawback to using AuthenticationStateProvider directly is that the component isn't notified automatically if the underlying authentication state data changes.
I just want get id of current user 😠but it's not work
If you want I will send u full project of git repo