Skip to content

[SG-1056] Fix login prompt loop for added accounts#2357

Merged
LRNcardozoWDF merged 2 commits intomasterfrom
bug/SG-1056-Fix-prompt-account-already-added-loop
Feb 10, 2023
Merged

[SG-1056] Fix login prompt loop for added accounts#2357
LRNcardozoWDF merged 2 commits intomasterfrom
bug/SG-1056-Fix-prompt-account-already-added-loop

Conversation

@LRNcardozoWDF
Copy link
Member

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Fix ‘Account already added Would you like to switch to it now?’ prompt loop when performing login with an account already added.

Code changes

  • src/App/Pages/Accounts/HomePageViewModel.cs: Added new condition to only prompt the user if the chosen account is authenticated.

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

@LRNcardozoWDF LRNcardozoWDF requested a review from a team February 10, 2023 15:49
(await _stateService.GetEnvironmentUrlsAsync(userId))?.Base == _environmentService.BaseUrl &&
await _stateService.IsAuthenticatedAsync(userId))
{
await _accountManager.PromptToSwitchToExistingAccountAsync(userId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but per existing patterns leave the return here and keep StartLoginAction() outside like before

@LRNcardozoWDF LRNcardozoWDF merged commit f42c677 into master Feb 10, 2023
@LRNcardozoWDF LRNcardozoWDF deleted the bug/SG-1056-Fix-prompt-account-already-added-loop branch February 10, 2023 17:49
trmartin4 pushed a commit that referenced this pull request Feb 10, 2023
* SG-1056 Fix login prompt loop for added accounts

* SG-1056 Fix PR comment

(cherry picked from commit f42c677)
Eeebru added a commit that referenced this pull request Feb 15, 2023
* [SG-1057] Make check breaches true by default (#2351)

(cherry picked from commit 6875389)

* [SG-1055] Init strength bar color (#2352)

(cherry picked from commit 3780587)

* [SG-1052] Fix copy (#2353)

(cherry picked from commit 0bd1b3f)

* [SG-1056] Fix login prompt loop for added accounts (#2357)

* SG-1056 Fix login prompt loop for added accounts

* SG-1056 Fix PR comment

(cherry picked from commit f42c677)

* Bumped version to 2023.2.0

---------

Co-authored-by: André Bispo <abispo@bitwarden.com>
Co-authored-by: Carlos Gonçalves <cgoncalves@bitwarden.com>
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
Co-authored-by: Opeyemi Alao <54288773+Eeebru@users.noreply.github.com>
Eeebru added a commit that referenced this pull request Feb 15, 2023
* [SG-1057] Make check breaches true by default (#2351)

(cherry picked from commit 6875389)

* [SG-1055] Init strength bar color (#2352)

(cherry picked from commit 3780587)

* [SG-1052] Fix copy (#2353)

(cherry picked from commit 0bd1b3f)

* [SG-1056] Fix login prompt loop for added accounts (#2357)

* SG-1056 Fix login prompt loop for added accounts

* SG-1056 Fix PR comment

(cherry picked from commit f42c677)

* Bumped version to 2023.2.0

---------

Co-authored-by: André Bispo <abispo@bitwarden.com>
Co-authored-by: Carlos Gonçalves <cgoncalves@bitwarden.com>
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
Co-authored-by: Opeyemi Alao <54288773+Eeebru@users.noreply.github.com>
(cherry picked from commit bc439b4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants