Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask user to swith account when reading code while signed in #5271

Merged

Conversation

cmonfortep
Copy link
Contributor

@cmonfortep cmonfortep commented Nov 13, 2024

Task/Issue URL: https://app.asana.com/0/72649045549333/1208755822305612/f

Description

When a Sync signed in user reads a recovery code, ask them to confirm if they want to switch account.

Includes:

  • Remote FF (disabled by default until implementation is completed)
  • Logic to handle that scenario when reading a QR code or introducing text manually.

Steps to test this PR

Feature 1

  • fresh install in 2 devices
  • Go to Feature flags and enable FF seamlessAccountSwitching on both
  • Create a Sync account in both devices (different ones)
  • From both devices access Sync settings and select "Sync With Another Device"
  • From one device, read the QR code from the other device
  • Ensure it appears a dialog asking the user to switch accounts appears
  • Click on switch account
  • Confirm you are switched to the new account
  • Confirm you see the recovery code screen and Device connected screen after that

Feature 2 (continuation from previous test)

  • logout one device, and create a new sync account there
  • you should have again 2 devices on 2 different sync accounts
  • From both devices access Sync settings and select "Sync With Another Device"
  • From one device, click "share copy text" so you have the recovery code copied in the clipboard
  • Send the code to the other device
  • In the other device, from that "Sync With Another Device" screen, click on "Manually enter code"
  • Click on paste code (which should be the code you copied before)
  • Ensure it appears a dialog asking the user to switch accounts appears
  • Click on switch account
  • Confirm you are switched to the new account
  • Confirm you see the recovery code screen and Device connected screen after that

UI changes

Before After
!(Upload before screenshot) (Upload after screenshot)

@cmonfortep
Copy link
Contributor Author

cmonfortep commented Nov 13, 2024

@CDRussell CDRussell self-assigned this Nov 15, 2024
Copy link
Member

@CDRussell CDRussell left a comment

Choose a reason for hiding this comment

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

Changes LGTM.

Tested with the written checklist and all good, and also checked that data already on both devices are synced across both after the logout/login switch happens.

@cmonfortep cmonfortep force-pushed the feature/cristian/sync/offer_join_account_as_option branch from 8837984 to 95ba72c Compare November 15, 2024 22:20
@cmonfortep cmonfortep force-pushed the feature/cristian/sync/offer_join_account_as_option branch 4 times, most recently from 29721ff to 94f20f0 Compare November 21, 2024 13:55
@cmonfortep cmonfortep force-pushed the feature/cristian/sync/offer_join_account_as_option branch from 94f20f0 to 043a10a Compare November 21, 2024 20:14
…5281)

Task/Issue URL:
https://app.asana.com/0/1203822806345703/1208755822305613/f

### Description
Introduces logic to switch the user account if sync has only 1 device
connected.
When multiple devices connected, we still ask the user.

### Steps to test this PR

_Feature 1_
- [x] Fresh install
- [x] Go to Feature flags and enable FF seamlessAccountSwitching
- [x] Create a sync account
- [x] Save or copy the recovery code
- [x] logout
- [x] Create a new sync account
- [x] Go to "Sync With Another Device", and read or paste the recovery
code
- [x] Ensure user is automatically switched to the other account

_Feature 1_
- [x] Fresh install
- [x] Go to Feature flags and enable FF seamlessAccountSwitching
- [x] Create a sync account
- [x] Save or copy the recovery code
- [x] logout
- [x] Join this account ->
https://app.asana.com/0/1203822806345703/1208795798275452/f
- [x] you are connected to an account with more devices
- [x] Go to "Sync With Another Device", and read or paste the recovery
code from the first account you created
- [x] Ensure you are asked to confirm switching accounts



### UI changes
| Before  | After |
| ------ | ----- |
!(Upload before screenshot)|(Upload after screenshot)|
@cmonfortep cmonfortep merged commit 0a1f156 into develop Nov 22, 2024
6 checks passed
@cmonfortep cmonfortep deleted the feature/cristian/sync/offer_join_account_as_option branch November 22, 2024 17:04
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