just change the href to the azure register page for your site:
<a href="https://mytenant./...">Register</a>
note: the login code just redirects to the azure login page.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have followed this guidance:
Secure an ASP.NET Core Blazor WebAssembly standalone app with Azure Active Directory B2C.
https://learn.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/standalone-with-azure-active-directory-b2c?view=aspnetcore-8.0
In the following section is mentioned that LoginDisplay component offer users to log in and register.
LoginDisplay component
The LoginDisplay component (Shared/LoginDisplay.razor) is rendered in the MainLayout component (Shared/MainLayout.razor) and manages the following behaviors:
For authenticated users:
Displays the current user name.
Offers a link to the user profile page in ASP.NET Core Identity.
Offers a button to log out of the app.
For anonymous users:
Offers the option to register.
Offers the option to log in.
In the LoginDisplay component is only one link
<a href="authentication/login">Log in </a>
If I add this link and click it
<a href="authentication/register"> Register</a>
I am directed /authentication/register page in the web assembly which says “Registration not supported”.
How I implement the register function so that I am directed to the Azure ad B2c to the endpoint https://mytenant.b2clogin.com/ mytenant.onmicrosoft.com/B2C_1_signin1
My appsettings.json is:
{
"AzureAdB2C": {
"Authority": "https://mytenant.b2clogin.com/mytenant.onmicrosoft.com/B2C_1_signin1",
"ClientId": "xxxxx-xxxx…",
"ValidateAuthority": false
}
}
just change the href to the azure register page for your site:
<a href="https://mytenant./...">Register</a>
note: the login code just redirects to the azure login page.