Ejemplo n.º 1
0
    public async override Task <AuthenticationState> GetAuthenticationStateAsync()
    {
        var token = await js.LocalStorageGetItem(TOKENKEY);

        if (string.IsNullOrEmpty(token))
        {
            return(Anonymous);
        }

        return(BuildAuthenticationState(token));
    }