Skip to content

I'm facing an issue with Passkey.getImmediate() on iOS when multiple user accounts have registered passkeys on the same device. #117

Open

Description

@osafahmad

Description

I'm facing an issue with Passkey.getImmediate() on iOS when multiple user accounts have registered passkeys on the same device.

I'm using:

  • React Native
  • react-native-passkey: 3.6.1
  • iOS

Steps to reproduce

  1. Login with Account A.
  2. Register a passkey for Account A.
  3. Logout.
  4. Login with Account B on the same device.
  5. Register a passkey for Account B.
  6. Logout.
  7. Try to login again with Account A using Passkey.getImmediate().
  8. The passkey prompt does not appear and Account A's passkey is not returned.
  9. Try the same flow with Account B.
  10. Account B's passkey prompt appears/works as expected.

Expected behavior

Both registered passkeys should remain available independently.

When attempting to authenticate Account A, the passkey registered for Account A should be available even though Account B was the most recently used account.

Ideally, getImmediate() should either:

  • Return the matching passkey for Account A, or
  • Fall back appropriately so the user can select the correct passkey.

Actual behavior

After registering passkeys for two different accounts on the same iOS device:

  • The passkey for the most recently registered/used account (Account B) works.
  • The passkey for the previous account (Account A) does not trigger the passkey prompt when using getImmediate().
  • It appears that the most recently used account/credential is being prioritized.

Additional information

The passkeys for both accounts are registered successfully and are still present on the device.

The issue seems specific to getImmediate() on iOS when multiple passkeys/accounts exist for the same relying party.

Using the normal Passkey.get() behavior may show the passkey UI, but getImmediate() does not behave as expected for the previously used account.

Could you please confirm whether this is expected behavior from Apple's preferImmediatelyAvailableCredentials / ASAuthorizationController implementation, or whether react-native-passkey can handle multiple registered accounts differently?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions