Beispiel #1
0
        public void MakeUserAnonymous()
        {
            _localStorageService.RemoveAsync(nameof(SecurityToken));
            var anonymousIdentity = new ClaimsIdentity();
            var anonymousPricipal = new ClaimsPrincipal(anonymousIdentity);
            var authState         = Task.FromResult(new AuthenticationState(anonymousPricipal));

            NotifyAuthenticationStateChanged(authState);
        }