Kyr
Blazor Web Assembly (stand alone) - [Authorize] Attribute not recognising roles straight after login
I have absolutely no idea why this makes a difference ... the default
GetAuthenticationStateAsync()
is just calling the GetAuthenticatedUser()
under the hood anyway so it should produce the same end result... but here we are49 replies
Blazor Web Assembly (stand alone) - [Authorize] Attribute not recognising roles straight after login
base.GetAuthenticatedUser()
is getting the user directly from JSInterop
Still getting the log...
info: Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationService[0] ### We are authenticated: False
49 replies
Blazor Web Assembly (stand alone) - [Authorize] Attribute not recognising roles straight after login
So on re-loading the page either manually or from a redirect back into the app it's a brand new instance of the wasm app so it should be empty the first time through
49 replies
Blazor Web Assembly (stand alone) - [Authorize] Attribute not recognising roles straight after login
49 replies
Blazor Web Assembly (stand alone) - [Authorize] Attribute not recognising roles straight after login
But then I don't get how... because using OIDC the user is redirected away from the Blazor app to the OIDC provider to log in, then redirected back to the app after logging in.
Shouldn't that mean that the Blazor app is re-bootstrapped when the user lands back on it?
49 replies
Blazor Web Assembly (stand alone) - [Authorize] Attribute not recognising roles straight after login
Already had to abandon the .NET 8 InteractiveAuto style Server + Wasm way of doing things because it just doesn't work with remote auth when you need client components to make authenticated requests to an external API... now having different auth problems with pure wasm.
49 replies