Skip to main content

Function: generatePasskeyRegistrationOptions()

generatePasskeyRegistrationOptions(config, req, user, excludeCredentials?): Promise<any>

Defined in: auth/src/auth/shared.ts:686

Begins a registration ceremony: generates a set of PublicKeyCredentialCreationOptions and stores the challenge in the session for later verification. The result is meant to be returned directly to the client for use with navigator.credentials.create().

Parameters​

config​

PasskeyConfig

The relying party configuration to use for this ceremony.

req​

HttpRequest

The source HTTP request. Used to persist the generated challenge in the session.

user​

The user the new credential will be associated with.

displayName?​

string

id​

string

name​

string

excludeCredentials?​

object[]

The user's already-registered credentials, if any, so that the authenticator can avoid creating a duplicate credential for one it already holds.

Returns​

Promise<any>