C# 只有登录和注销流在Azure Active Directory B2C中有效
我按照微软的官方指南进行设置,该设置运行良好,登录打开一个新窗口,要求提供凭证,注销刷新页面并注销。我检查了代码,似乎为了进行登录或注销,您只需要在中设置操作C# 只有登录和注销流在Azure Active Directory B2C中有效,c#,azure,asp.net-core,azure-ad-b2c,blazor,C#,Azure,Asp.net Core,Azure Ad B2c,Blazor,我按照微软的官方指南进行设置,该设置运行良好,登录打开一个新窗口,要求提供凭证,注销刷新页面并注销。我检查了代码,似乎为了进行登录或注销,您只需要在中设置操作 @page "/authentication/{action}" @using Microsoft.AspNetCore.Components.WebAssembly.Authentication <RemoteAuthenticatorView Action="@Action" /> @code{ [Paramet
@page "/authentication/{action}"
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
<RemoteAuthenticatorView Action="@Action" />
@code{
[Parameter] public string Action { get; set; }
}
因此,我尝试使用actionsprofile和register
- 配置文件向我显示
消息不支持编辑配置文件。
- 注册使用
查询参数将我重定向回主页?返回URL=%2f身份验证%2f登录
我想同时注册和更新配置文件。您为ProfileEdit创建了用户流吗?注册器按预期工作,您可以从登录页面注册用户(为此,您需要signuporsignin userflow)。@Manish是的,我为ProfileEdit创建了用户流,但我没有在代码中的任何位置添加名称,不知道应该将其添加到何处。是的,我可以从登录流注册,但我想显示注册页面而不显示as登录中间层。我需要动态更改
wwwroot/appsettings.json
文件中的authority参数,以包括用户在App@JasSuri我不你真的明白这一点,能给我举个例子吗?你是否按照Jas Suri的建议修改了appsettings.json
文件中Authority
的值?看见
+--------------------------------+----------------------------------------------------------------------------+
| Route | Purpose |
+--------------------------------+----------------------------------------------------------------------------+
| authentication/login | Triggers a sign-in operation. |
| authentication/login-callback | Handles the result of any sign-in operation. |
| authentication/login-failed | Displays error messages when the sign-in operation fails for some reason. |
| authentication/logout | Triggers a sign-out operation. |
| authentication/logout-callback | Handles the result of a sign-out operation. |
| authentication/logout-failed | Displays error messages when the sign-out operation fails for some reason. |
| authentication/logged-out | Indicates that the user has successfully logout. |
| authentication/profile | Triggers an operation to edit the user profile. |
| authentication/register | Triggers an operation to register a new user. |
+--------------------------------+----------------------------------------------------------------------------+