State is not preserved after login in .net 8.02 #54514
Labels
area-blazor
Includes: Blazor, Razor Components
feature-blazor-wasm
This issue is related to and / or impacts Blazor WebAssembly
✔️ Resolution: Duplicate
Resolved as a duplicate of another issue
Status: Resolved
Is there an existing issue for this?
Describe the bug
We are migrating from a .net 7 blazor client side webassembly app to .net 8. But have run into an issue. When doing a successful login, we have som logic that change where the user is redirected. For this we are using the RemoteAuthenticationState.ReturnUrl on the login event.
However, Remoteauthenticationstate is null after successfull login in .net 8.02.
It works on localhost but in staging environment and production it resolves to null.
The staging environment is a azure webapp not a static webapp.
Expected Behavior
State should not be null and contain a returnurl on successful login
Steps To Reproduce
Steps to reproduce.
Create blazor webassembly standalone app template project with authentication.
Change from Microsoft to standard OIDC authentication(we are using identityserver4).
In authentication.razor component add the following eventcallback when login is successful
Try to login and get a null exception on state.
We have tried several different implementations but it all resolves to null.
Exceptions (if any)
we get a null exception on the state
.NET Version
8.02 LTS
Anything else?
No response
The text was updated successfully, but these errors were encountered: