Passkey Enrollment Screen
The Passkey Enrollment 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.
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 PasskeyEnrollment {
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?
context_configuration: [
"branding.settings",
"branding.themes.default",
"client.logo_uri",
"client.description",
"client.metadata.[key_name]",
"organization.display_name",
"organization.branding",
"organization.metadata.[key_name]",
"screen.texts",
"tenant.name",
"tenant.friendly_name",
"tenant.enabled_locales",
"transaction.connection.metadata.[key_name]",
"untrusted_data.submitted_form_data",
"untrusted_data.authorization_params.ui_locales",
"untrusted_data.authorization_params.login_hint",
"untrusted_data.authorization_params.screen_hint",
"untrusted_data.authorization_params.ext-[key_name]"
]
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 PasskeyEnrollment
class to access its properties and methods.
import PasskeyEnrollment from '@auth0/auth0-acul-js/passkey-enrollment';
const passskeyEnrollmentManager = new PasskeyEnrollment();
// SDK Properties return a string, number or boolean
// ex. "passkey-enrollment"
passskeyEnrollmentManager.screen.name;
// SDK Methods return an object or array
// ex. { back: "/back_url" }
passskeyEnrollmentManager.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.backLink |
string |
Link to previous screen. |
screen.loginLink |
string |
Link to the login flow. |
screen.getPublicKey() |
object |
Get the |
Screen Operations
The Passkey Enrollment 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()
// This method does not support any parameters
passkeyEnrollment.abortPasskeyEnrollment();
Was this helpful?