Redirect to Login page as opposed to pop-up Login in Blazor

Viewed 1657

I have a Blazor WebAssembly app that uses Azure AD B2C for authentication.

builder.Services.AddMsalAuthentication(options =>
{
    builder.Configuration.Bind("AzureAdB2C", options.ProviderOptions.Authentication);
});

When the user is redirected to authentication, Blazor display the login in a pop-up.

The problem with the pop-up is that the user could bury it if they clicked on the screen outside of the pop-up.

Wondering if there is a way to force the authentication to redirect to the page as opposed to displaying the pop-up.

1 Answers

To change from the pop-up page to a redirect you need:

options.ProviderOptions.LoginMode = "Redirect";
Related