private async Task ProcessPreviousActionCode()
        {
            var previousActionCode = await Utils.GetAndRemoveSessionStorageData(_jsRuntime, "_previousActionCode");

            switch (previousActionCode)
            {
            case Constants.SignedInSuccess:
                _authenticationEventHandler.NotifySignInSuccess();
                break;

            case Constants.SignedOutSuccess:
                _authenticationEventHandler.NotifySignOutSuccess();
                break;
            }
        }
Beispiel #2
0
        public async Task SignOutPopupAsync()
        {
            try
            {
                await _jsRuntime.InvokeVoidAsync(Constants.SignoutPopup);

                await _jsRuntime.InvokeVoidAsync(Constants.RemoveUser);

                _authenticationEventHandler.NotifySignOutSuccess();
            }
            catch (Exception err)
            {
                _authenticationEventHandler.NotifySignOutFail(err);
            }
            _authenticationStateProvider.NotifyAuthenticationStateChanged();
        }