В Azure Active Directory B2C работает только вход и выход из системы - PullRequest
2 голосов
/ 03 мая 2020

Я следовал официальному руководству Microsoft по настройке ASP. NET Автономное приложение Core Blazor WebAssembly с Azure Active Directory B2 C, которое работало отлично, при входе открывается новое окно, которое запрашивает учетные данные и выходит из системы, обновляет sh страницу и выходит из системы. Я проверил код, и кажется, что для входа в систему или выхода из системы вам просто нужно установить действие в

@page "/authentication/{action}"
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
<RemoteAuthenticatorView Action="@Action" />

@code{
    [Parameter] public string Action { get; set; }
}

и на основе документов Microsoft доступные маршруты:

+--------------------------------+----------------------------------------------------------------------------+
|             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.                              |
+--------------------------------+----------------------------------------------------------------------------+

Поэтому я попытался использовать действия профиль и регистрация .

  • профиль показывает мне Editing the profile is not supported. сообщение
  • регистрация перенаправляет меня на домашнюю страницу с параметром запроса ?returnUrl=%2Fauthentication%2Flogin

Я хочу зарегистрироваться и обновить профиль.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...