简体   繁体   中英

.net core 3.1 Blazor WebAssembly: does not contain a definition for "LoginMode"

I am currently trying to change the default of popup to redirect upon logging in.
I am using .NETCORE 3.1 Blazor WebAssembly any help would be great! Thanks!

code block

csproj packages

According to this github issue that the redirect mode only supported in the asp.net core 5.0.

If your application is 3.1, it will not work well.

If you migrate to 5.0, then you could use below codes to use redirect instead of popup.

builder.Services.AddMsalAuthentication(options =>
{
    ...
    options.ProviderOptions.LoginMode = "redirect";
});

More details ,you could refer to this article .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM