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

Login with Passkeys!! #1599

Merged
merged 33 commits into from
Jul 2, 2024
Merged

Conversation

charliescheer
Copy link
Contributor

@charliescheer charliescheer commented Jun 12, 2024

Fix

To improve the security of Simplenote accounts we are trying to move away from email/password authentication as it is insecure at best. One of the things we are implementing is Passkeys. This will allow users to create and store passkeys on their apple device and when they go to log into their account rather than using an email and password they only need to put in their email and then use the local biometrics to receive a passkey and then authenticate into Simplenote.

This has a bunch of security benefits and should also help users keep from losing their passwords.

Sign up for passkeys:

RPReplay_Final1718384460.mp4

Login with passkeys:

RPReplay_Final1718384268.mp4

Test

  1. Clean install Simplenote on device (can't access biometrics on sim) Tap on login and choose to login with email and password
  2. Once logged in go to the menu -> Settings and in the account section you will see a "Add Passkey Authentication" button. Press that. After a few seconds you will receive a notice from device asking if you want to create a passkey. Confirm and wait a few seconds. (NOTE: Currently there is no spinner or success/failure indication, that will be in a future PR)
  3. Log out of Simplenote
  4. Tap on the Login button and choose Login with Passkeys
  5. Enter your email and tap on the Login with Passkeys Button
  6. after a few seconds you will be prompted by device if you want to login with passkeys, confirm
  • Confirm you are able to log into your Simplenote account.

Review

(Required) Add instructions for reviewers. For example:

Only one developer is 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 0c4129 with:

Added Passkey authentication support

@dangermattic
Copy link
Collaborator

dangermattic commented Jun 12, 2024

1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jun 12, 2024

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

  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr1599-ce93a56-01907509-ed91-4002-9863-0c684ba149e0 on your iPhone

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

@charliescheer charliescheer changed the title WIP: passkey implementation Login with Passkeysasskey implementation Jun 14, 2024
@charliescheer charliescheer changed the title Login with Passkeysasskey implementation Login with Passkeys!! Jun 14, 2024
@charliescheer charliescheer self-assigned this Jun 14, 2024
@charliescheer charliescheer added the [feature] login Anything relating to login. label Jun 14, 2024
@charliescheer charliescheer marked this pull request as ready for review June 14, 2024 16:54
Copy link
Contributor

@jleandroperez jleandroperez left a comment

Choose a reason for hiding this comment

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

Sending you a few notes, looking great Charlie!!

Simplenote/Classes/SPAuthViewController.swift Outdated Show resolved Hide resolved
Simplenote/Classes/SPAuthViewController.swift Outdated Show resolved Hide resolved
Simplenote/Classes/SPAuthViewController.swift Outdated Show resolved Hide resolved
Simplenote/Data+Simplenote.swift Show resolved Hide resolved
Simplenote/PasskeyAuthenticator.swift Outdated Show resolved Hide resolved
Simplenote/PasskeyAuthenticator.swift Outdated Show resolved Hide resolved
Simplenote/PasskeyRegistrationResponse.swift Outdated Show resolved Hide resolved
@charliescheer charliescheer force-pushed the charlie/passkey-implementation branch from 7e524e0 to 23ed723 Compare July 1, 2024 17:56
@charliescheer charliescheer changed the base branch from trunk to feature/passkeys July 1, 2024 17:57
Copy link
Contributor

@jleandroperez jleandroperez left a comment

Choose a reason for hiding this comment

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

@charliescheer We'd need to polish all of the flows:

  • Entering the wrong password during the Passkey Registration results in no feedback
  • I was unable to associate the 1P entry I had, with the new Passkey
  • The Onboarding flow also results in no feedback, if you previously didn't have a Passkey

That being said, since we're targetting a feature branch, no blockers to merge this one!

Nice work!!

:shipit:

Simplenote/AccountRemote.swift Outdated Show resolved Hide resolved
Simplenote/AccountRemote.swift Outdated Show resolved Hide resolved
Simplenote/AccountRemote.swift Outdated Show resolved Hide resolved
Simplenote/Classes/SPAuthViewController.swift Show resolved Hide resolved
Simplenote/PasskeyAuthenticator.swift Show resolved Hide resolved
Simplenote/Remote.swift Show resolved Hide resolved
static let alertTitle = NSLocalizedString("Passkey Setup", comment: "Alert title for setting up passkeys")
static let message = NSLocalizedString("To add passkeys you must enter your password", comment: "Message prompting user for password to create passkey")
static let submit = NSLocalizedString("Submit", comment: "Submit button title")
static let cancel = NSLocalizedString("cancel", comment: "Cancel button title")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nipticky: We should prob. capitalize this one

@charliescheer
Copy link
Contributor Author

Entering the wrong password during the Passkey Registration results in no feedback
I was unable to associate the 1P entry I had, with the new Passkey
The Onboarding flow also results in no feedback, if you previously didn't have a Passkey

Yes! All of that stuff is coming in a future PR

@charliescheer charliescheer merged commit 39fe14c into feature/passkeys Jul 2, 2024
10 checks passed
@charliescheer charliescheer deleted the charlie/passkey-implementation branch July 2, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[feature] login Anything relating to login.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants