Search code examples
asp.net-coreasp.net-identityidentityserver4blazorwebassembly

how to change Blazor WASM identity net core 3.1 messages "You are logged out", "checking login state" and "authorizing"?


I need to know how to personalize and/or change language for this messages, I suppose it has to do with IdentityServer4.

Any ideas?


Solution

  • What you are looking for is the RemoteAuthenticatorView .

    You can find more details for your answer in the official documentation.

    @page "/security/{action}"
    @using Microsoft.AspNetCore.Components.WebAssembly.Authentication
    
    <RemoteAuthenticatorView Action="@Action">
        @*authentication/login*
        <LoggingIn></LoggingIn> 
        @*authentication/login-callback*
        <CompletingLoggingIn></CompletingLoggingIn>
        @*authentication/login-failed*
        <LogInFailed></LogInFailed>
        @*authentication/logout*
        <LogOut></LogOut>
        @*authentication/logout-callback*
        <CompletingLogOut></CompletingLogOut>
        @*authentication/logout-failed*
        <LogOutFailed></LogOutFailed>
        @*authentication/logged-out*
        <LogOutSucceeded></LogOutSucceeded>
        @*authentication/profile*
        <UserProfile></UserProfile>
        @*authentication/register*
        <Registering></Registering>
    </RemoteAuthenticatorView>
    
    @code{
        [Parameter]
        public string Action { get; set; }
    }