Implementation for AutoLogin in Apps using Passkeys

Hi, I understand that during subsequent login attempts, either the modal or autofill requests are shown for the user to authenticate if they are registered for passkeys during manual login first attempt.

Currently, our app has the option to automatically authenticate user using Face ID on App launch using the enrollment keys we had obtained during manual login if the user has opted for Face ID as login method for subsequent attempts. Simply put, there is no user intervention for this existing autologin step other than app launch. My questions are:

  1. Is there an API option that could call Face Authentication step of Passkeys directly without showing modal or Autofill so that we land on delegate on Face ID authentication success? OR
  2. Can the continue button in modal that gets presented for subsequent passkeys authentication attempt be called programmatically so that we land on delegate on Face ID authentication success?

we will call Option 1 or 2 after we get the challenge from Server on App Launch.

Replies

Like with a password, signing in with a passkey always requires user consent.

It's important not to conflate authentication with session management. Keeping a user signed in is a form of session management. The user has already consented to sign in with a given account, and a service can make decisions about how long that session is valid for or when to extend/invalidate the session (e.g. one may extend the life of an existing session if biometrics are provided). Signing a user in is about the initial authentication. A user must consent to sign in at all, and decide which account they'd like to sign in with. Passkeys are a form of authentication that happens to use Face ID when it's available.

tl;dr you can keep using your existing Face ID flow for all accounts, and use passkeys when signing a user in for the first time 🙂