简体   繁体   English

.net core 3.1 Blazor WebAssembly:不包含“LoginMode”的定义

[英].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!谢谢!

code block代码块

csproj packages csproj 包

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.

相关问题 DirectoryEntry 不包含“属性”的定义(.NET CORE 3.1) - DirectoryEntry does not contain a definition for 'Properties' (.NET CORE 3.1) .net 核心 3.1:&#39;IAsyncEnumerable<string> &#39; 不包含 &#39;GetAwaiter&#39; 的定义 - .net core 3.1: 'IAsyncEnumerable<string>' does not contain a definition for 'GetAwaiter' .NET Core 3.1 - HostingEnvironment 不包含 MapPath 的定义 - .NET Core 3.1 - HostingEnvironment does not contain a definition for MapPath “IDataProtectionBuilder”不包含“ProtectKeysWithAzureKeyVault”MVC dotnet core 3.1 的定义 - 'IDataProtectionBuilder' does not contain a definition for 'ProtectKeysWithAzureKeyVault' MVC dotnet core 3.1 Blazor Webassembly 项目、ASP.NET Core 3.1 中不会出现断点, - Breakpoints won't hit in Blazor Webassembly project, ASP.NET Core 3.1, Delegate在.net核心中不包含CreateDelegate的定义 - Delegate does not contain a definition for CreateDelegate in .net core 网络核心:“ HttpContext”不包含“当前”的定义 - Net Core: 'HttpContext' does not contain a definition for 'Current'` 'string' 不包含 .Net Core 中 'AsInt' 的定义 - 'string' does not contain a definition for 'AsInt' in .Net Core 在具有 .NET 核心的 Blazor WebAssembly 中使用 Windows 身份验证 - Using Windows Authentication in Blazor WebAssembly with .NET Core http请求在.net core 2.1中不包含createresponse的定义 - http request does not contain a definition for createresponse in .net core 2.1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM