Detecting Passkey Usage in Auth0 Post-Login Actions

Overview

Auth0 detects when a user authenticates with a passkey via a Post-Login Action. The Action evaluates the authentication methods array in the event object to determine if a passkey was used during the login process.

Applies To
  • Auth0
  • Post-Login Actions
  • Passkeys
Solution

Evaluate the authentication methods array within a Post-Login Action using the following JavaScript snippet to determine if a passkey was used during the login process.

event.authentication?.methods?.some(method => method.name === 'passkey');

Recommended content

No recommended content found...