public IObservable<TwoFactorChallengeResult> HandleTwoFactorException(TwoFactorAuthorizationException exception) { var userError = new TwoFactorRequiredUserError(exception); return twoFactorDialog.Show(userError) .ObserveOn(RxApp.MainThreadScheduler) .SelectMany(x => x == RecoveryOptionResult.RetryOperation ? Observable.Return(userError.ChallengeResult) : Observable.Throw<TwoFactorChallengeResult>(exception)); }
public TwoFactorRequiredUserError(TwoFactorAuthorizationException exception) : base(exception.Message, innerException: exception) { TwoFactorType = exception.TwoFactorType; RetryFailed = exception is TwoFactorChallengeFailedException; }