[英].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!我正在使用 .NETCORE 3.1 Blazor WebAssembly 任何帮助都会很棒! Thanks!谢谢!
According to this github issue that the redirect mode only supported in the asp.net core 5.0.根据this github issue ,重定向模式仅在asp.net core 5.0中支持。
If your application is 3.1, it will not work well.如果您的应用程序是 3.1,它将无法正常工作。
If you migrate to 5.0, then you could use below codes to use redirect instead of popup.如果您迁移到 5.0,那么您可以使用以下代码来使用重定向而不是弹出窗口。
builder.Services.AddMsalAuthentication(options =>
{
...
options.ProviderOptions.LoginMode = "redirect";
});
More details ,you could refer to this article .更多细节,你可以参考这篇文章。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.