Passkey Enrollment Local Screen

The Passkey Enrollment Local screen is part of the Identifier First Authentication flow. It allows the user to create a passkey to use as their authentication credential for all subsequent authentications on your application. Review Passkeys to learn more about using passkeys in Auth0.

Passkey Enrollment Local

Context Data

The Universal Login Context Data contains unique-per-screen transaction and configuration data. Optional context data can be configured in the Management API with the context_configuration parameter. Read Universal Login Context for information about context data and read Configure Screens for details about optional context data.

interface PasskeyEnrollmentLocal {
  client?: Client;
  organization?: Organization;
  prompt: Prompt;
  screen: {
    name: string;
    links: {
      back: string;
    };
    data: {
      passkeys: PasskeyCreate;
    };
  };
  transaction: {
    state: string;
    locale: string;
    errors?: Error[];
    connection: DbConnection | PasswordlessConnection;
    alternate_connections?: Connection[];
  };
};

Was this helpful?

/

Accessing Context Data

Using the Auth0 ACUL JS SDK to access the context data for each screen is recommended. The SDK provides properties and methods that simplify accessing the data.

Initialize the PasskeyEnrollmentLocal class to access its properties and methods.

import PasskeyEnrollmentLocal from '@auth0/auth0-acul-js/passkey-enrollment-local';
const passskeyEnrollmentLocalManager = new PasskeyEnrollmentLocal();

// SDK Properties return a string, number or boolean
// ex. "passkey-enrollment-local"
passskeyEnrollmentLocalManager.screen.name;

// SDK Methods return an object or array
// ex. { back: "/back_url" } 
passskeyEnrollmentLocalManager.screenLinks();

Was this helpful?

/

SDK Properties & Methods

The following screen-specific properties and methods are available on this screen:

Property or Method Type Description
screen.getPublicKey()

object

Get the publicKey to initiate a Passkey authentication.

Screen Operations

The Passkey Enrollment Local screen supports the following operations.

Continue Passkey Enrollment

Create a passkey and authenticate the user. After creating the passkey, this operation sends the user to the redirect_url.

SDK Method: continuePasskeyEnrollment()

// This method does not support any parameters
passkeyEnrollment.continuePasskeyEnrollment();

Was this helpful?

/

Continue with Password

Skip the passkey creation and provide a password instead. This operation sends the user to the Signup Password Screen to create their password.

SDK Method: abortPasskeyEnrollment()

Parameter Type Required Description
doNotShowAgain boolean Yes Indicates whether or not the user wants to be reminded to create a passkey again after skipping initial creation.

passkeyEnrollment.abortPasskeyEnrollment({
  doNotShowAgain: <BooleanFieldValue>
});

Was this helpful?

/