Skip to content
New issue

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

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

Already on GitHub? # to your account

iOS - Display Sync code expiry when showing the pairing codes #38020

Closed
soner-yuksel opened this issue May 2, 2024 · 3 comments · Fixed by brave/brave-core#23394
Closed

iOS - Display Sync code expiry when showing the pairing codes #38020

soner-yuksel opened this issue May 2, 2024 · 3 comments · Fixed by brave/brave-core#23394

Comments

@soner-yuksel
Copy link

soner-yuksel commented May 2, 2024

It is required to implement display Sync code expiry when showing the pairing codes.

Parent issue: #31904

Figma design:
https://www.figma.com/file/GXnHuBCVRY397UNJyvu44q/Sync-V2?node-id=307-161

This is an issue to link to the PR.

@kjozwiak
Copy link
Member

kjozwiak commented Jun 26, 2024

@soner-yuksel quick question re: verifying the above. How long does it take for a sync code to expire? Is it still 24hrs? If so, is there any way we can expedite the "expiry" flow without waiting the 24hrs. Perhaps adding something into the QA Dev settings where we can set the time to less than ~24hrs to speed things up? Or does the back-end control the expiry making this hard to QA? CCing @hffvld @Uni-verse

@soner-yuksel
Copy link
Author

@kjozwiak I believe QR code and sync code words have different expiry time. I had to make changes inside the PR for this atfer opening because @AlexeyBarabash warned me about it. We are getting the expiry time from server. Myabe @AlexeyBarabash can remember the exact tiem frame for expiry.

@hffvld
Copy link
Contributor

hffvld commented Jul 8, 2024

Verified on iPhone 14 and iPad Air using version(s):

Device/OS: 
- iPhone 14 / iOS 17.6
- iPad Air / iPadOS 16.7.2
Brave build: 1.68 (110)
BraveCore: 1.68.110 (127.0.6533.26)

Filed follow-up issue #39628 and #39631

QR code

STEPS:

  1. Launch Brave
  2. Open Settings > Sync
  3. Start a new Sync Chain
  4. Tap Tablet or Phone > Verify the string on the bottom of the QR Code
  5. Take a screenshot of the QR Code
  6. Go to device settings and change the time so that the QR Code will expire (only for testing purposes) > Verify the string
  7. Tap Generate New Code > Verify new QR code can be created
  8. Take another iOS or Android device and scan the QR code (need to update system time as well) > Verify new device can be added
  9. Compare a new QR code with the first one (check the screenshot) > Verify they are different
  10. Remove a newly added device or take another one > Tap Add New Device
  11. Choose Tablet or Phone > Scan the QR code with an Android device
  12. Keep Brave with the Warning screen opened
  13. Wait for the QR code to expire (change system time for testing purposes)
  14. Tap Yes on Android device > Verify that QR code must not work
  15. Remove a newly added device or take another one > Tap Add New Device
  16. Choose Tablet or Phone > Take a screenshot of the QR Code
  17. Wait for the QR code to expire (change system time for testing purposes)
  18. On another device scan the expired QR code (screenshot) > Verify that the QR code is not working

ACTUAL RESULTS:

  • Verified that the string This temporary code is valid for the next 0 hours 29 min 59 seconds is shown below the QR Code and the timer is working.
  • Verified that the string Code expired. Generate a new one by clicking the button below. shown after the QR Code expires.
  • Verified that the new QR Code can be generated when the old one expires.
  • Verified that the QR code can be successfully scanned, and a new device (iOS or Android) is added to the existing Sync chain.
  • Verified that each newly generated QR code is unique.
  • Verified that the expired QR code can't be used to add a new device to the existing Sync chain

iPhone 14

1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4

iPad Air

1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
Code Words

STEPS:

  1. Launch Brave
  2. Open Settings > Sync
  3. Start a new Sync Chain
  4. Tap Tablet or Phone > Code Words > Verify the string on the bottom of the phrase
  5. Take a screenshot of the phrase
  6. Go to device settings and change the time so that the phrase will expire (only for testing purposes) > Verify the string
  7. Tap Generate New Code > Verify new QR code can be created
  8. Take another iOS or Android device and copy/paste the phrase (need to update system time as well) > Verify new device can be added
  9. Compare a new phrase code with the first one (check the screenshot) > Verify they are different
  10. Remove a newly added device or take another one > Tap Add New Device
  11. Choose Tablet or Phone > Scan the QR code with an Android device
  12. Keep Brave with the Warning screen opened
  13. Wait for the QR code to expire (change system time for testing purposes)
  14. Tap Yes on Android device > Verify that QR code must not work
  15. Remove a newly added device or take another one > Tap Add New Device
  16. Choose Tablet or Phone > Copy/paste the phrase
  17. Wait for the QR code to expire (change system time for testing purposes)
  18. Try to add another device > Verify that Code Words phrase is not working

ACTUAL RESULTS:

  • Verified that the string This temporary code is valid for the next 43 hours 12 min 59 seconds is shown below the QR Code and the timer is working.
  • Verified that the string Code expired. Generate a new one by clicking the button below. shown after the phrase expires.
  • Verified that the new phrase can be generated when the old one expires.
  • Verified that the phrase can be successfully copied/pasted, and a new device (iOS or Android) is added to the existing Sync chain.
  • Verified that the expired Code Words phrase can't be used to add a new device to the existing Sync chain

iPhone 14

1 2 3 4
1 2 3 4
1 2 3 4

iPad Air

1 2 3 4
1 2 3 4
1 2 3 4

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants