Replies: 4 comments 3 replies
-
|
Note: I have identified that this is due to the enhanced navigation in Blazor .NET 8 and signing in with NavigationManager.NavigateTo("MicrosoftIdentity/Account/SignIn", forceLoad: true);leads to correct behavior. |
Beta Was this translation helpful? Give feedback.
-
|
It might be good to ask on the official ASP.NET Core repo, indeed. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Having the same issue with the infinite signout redirect loop while migrating to .NET 8. Did you find a workaround? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Because the existing
Microsoft.Identity.Web.UIuses controllers, I imagined that the existing package should work with the new .NET 8 Blazor Web app given some slight modification.My process so far:
dotnet new blazorserver --auth IndividualB2C --aad-b2c-instance [instance-id]appsettings.json- can get .NET 7 Blazor Server to work with my B2C App registration.dotnet new blazor, copying minimal code and relevantappsettings.json, which involves the following initialization code:a.
AuthenticationStateProvidernot added by default in new template, must callIssues encountered:
AuthorizationPolicy(such as by callingapp.MapRazorComponents<App>().RequireAuthorization()), the sign-in page immediately opens and after completion, successfully redirects back to the application. However, when this policy is not added and the user attempts to sign in by navigating toMicrosoftIdentity/Account/SignIn, they receive the following CORS error:AuthorizationPolicyis set and the user signs-in, attempting to sign out puts them in an infinite loop.I thought about opening an issue for official .NET 8 support, but I wanted to preclude the possibility that what I'm encountering is user error first.
Beta Was this translation helpful? Give feedback.
All reactions