Browse Source

PS-90: App keeps asking for 2FA even though I've checked the "remember me" checkbox (#1921)

- Logout was removing the 2FA token, portion of code deleted.
- Clear saved token when 2FA error is returned by the server.

Co-authored-by: André Bispo <abispo@bitwarden.com>
github-services/pull/1924/head
André Filipe da Silva Bispo 4 years ago committed by GitHub
parent
commit
7e9b7398c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/Core/Services/AuthService.cs
  2. 4
      src/Core/Services/StateService.cs

1
src/Core/Services/AuthService.cs

@ -346,6 +346,7 @@ namespace Bit.Core.Services @@ -346,6 +346,7 @@ namespace Bit.Core.Services
TwoFactorProvidersData = response.TwoFactorResponse.TwoFactorProviders2;
result.TwoFactorProviders = response.TwoFactorResponse.TwoFactorProviders2;
CaptchaToken = response.TwoFactorResponse.CaptchaToken;
await _tokenService.ClearTwoFactorTokenAsync(email);
return result;
}

4
src/Core/Services/StateService.cs

@ -1372,10 +1372,6 @@ namespace Bit.Core.Services @@ -1372,10 +1372,6 @@ namespace Bit.Core.Services
await SetEncryptedPasswordGenerationHistoryAsync(null, userId);
await SetEncryptedSendsAsync(null, userId);
await SetSettingsAsync(null, userId);
if (!string.IsNullOrWhiteSpace(email))
{
await SetTwoFactorTokenAsync(null, email);
}
if (userInitiated)
{

Loading…
Cancel
Save