How do I use passkeys in my app?

Asked on 07/30/2024

1 search

To use passkeys in your app, you can follow these steps:

  1. Automatic Passkey Upgrades: Implement automatic passkey upgrades to transition existing accounts from passwords to passkeys seamlessly. This can be done without interrupting the user flow. When a user signs in with a password, your app can check if a passkey exists for the account and offer to create one if it doesn't. If all preconditions are met, a passkey is created automatically (Streamline sign-in with passkey upgrades and credential managers).

  2. New Registration API: Use the new registration API to create passkeys automatically for eligible users the next time they sign into your app. This ensures future sign-ins are faster and more secure (Platforms State of the Union).

  3. Credential Manager Integration: Integrate with credential managers to support automatic passkey upgrades. Credential managers can fill usernames, passwords, and one-time codes into any text field, enhancing the sign-in experience (Streamline sign-in with passkey upgrades and credential managers).

  4. Web Support: For web applications, ensure to use get client capabilities to check browser support for automatic passkey upgrades. This helps in transitioning from modal passkey creation to an automatic upgrade style request (Streamline sign-in with passkey upgrades and credential managers).

  5. User Experience: By adopting passkeys, you provide a secure and easy way for users to sign in, eliminating the need to remember passwords and reducing the risk of phishing attacks (What’s new in privacy).

For a detailed guide on implementing these features, you can watch the session Streamline sign-in with passkey upgrades and credential managers.

How do I use passkeys in my app? | Ask WWDC