Automattic / simplenote-ios

Simplenote for iOS
https://simplenote.com
GNU General Public License v2.0
2.06k stars 284 forks source link

Passkeys: Errors, Alerts, UI Feedback #1610

Closed charliescheer closed 4 months ago

charliescheer commented 5 months ago

Fix

The first implementation of passkeys works to create passkeys and allow for users to authenticate with them, but it lacks some UI refinement. There is no indication of progress happening, the UI remains unlocked, and there is no indication if the process is succeeding or failing.... Not a great user experience.

So to improve that I have added spinners, ui locking, errors, and alerts so that users have a better idea of what is going on when they use passkeys.

Test

Setup:

  1. Go to the passkey DB and delete any existing passkeys you have (ping me if you need a link to the db)
  2. On a Mac linked to the same iCloud as your testing device, go to Apple Settings > Passwords and search for any existing passkeys for simplenote at the testing url and delete them

Registration:

  1. Log into simplenote using email/password and go to the settings view
  2. Put your device into airplane mode and then try to register a passkey by tapping on Add Passkey Authentication
  3. Confirm that you see a spinner for a moment and then an alert appears that you failed to register
  4. Go out of airplane mode, Tap on Add Passkey Authentication again. Enter your email and confirm the spinner appears
  5. When the FaceID modal pops up, dismiss it without confirming. Confirm that an alert pops up saying you failed to register. Also confirm that the UI is unlocked
  6. Tap on Add Passkey Authentication again and this time let it scan your face. You should succeed this time. Confirm that you get a Success alert

Login:

  1. Logout of the account you just registered a passkey for
  2. On the login screen go to Login > Login with Passkeys and enter your email address
  3. Put the device in airplane mode and then tap on the login with passkey button. Confirm you see an error alert
  4. Take the device out of airplane mode, tap on the login button again. When the faceID ui appears dismiss it. Confirm you see an alert
  5. Tap on the login button again and this time go through the whole process. Confirm you see a login spinner on the button, the ui is locked, and then when it succeeds confirm you are logged into your account

Review

(Required) Add instructions for reviewers. For example:

Only one developer and one designer are required to review these changes, but anyone can perform the review.

Release

(Required) Add a concise statement to RELEASE-NOTES.txt if the changes should be included in release notes. Include details about updating the notes in this section. For example:

RELEASE-NOTES.txt was updated in d3adb3ef with:

Added markdown support

If the changes should not be included in release notes, add a statement to this section. For example:

These changes do not require release notes.

wpmobilebot commented 5 months ago

You can test the changes in simplenote-ios from this Pull Request by:

If you need access to App Center, please ask a maintainer to add you.