class Passkeys

Constants

private DEFAULT_PASSKEY_MODEL

private DEFAULT_REGISTERS_ROUTES

Methods

static string
relyingPartyId()

Get the relying party ID.

static void
resolveRelyingPartyIdUsing(callable|null $callback)

Register a callback to resolve the WebAuthn relying party ID for the current request.

static array
allowedOrigins()

Get the origins allowed to complete WebAuthn ceremonies.

static void
resolveAllowedOriginsUsing(callable|null $callback)

Register a callback to resolve WebAuthn allowed origins for the current request.

static bool
hasRequestAwareAllowedOrigins()

Determine if allowed origins are currently resolved from request-aware state.

static int
timeout()

Get the WebAuthn timeout in milliseconds.

static string
passkeyModel()

Get the passkey model class name.

static void
usePasskeyModel(string $model)

Set the passkey model class name.

static void
authorizeLoginUsing(callable|null $callback)

Register a callback to authorize passkey logins before login.

static bool
allowsLogin(Request $request, Passkey $passkey)

Determine if a passkey-verified user should be allowed to log in.

static void
redirectUsing(callable|null $callback)

Register a callback to resolve the successful login redirect path.

static string
redirectTo(Request $request)

Resolve the successful login redirect path for this request.

static string
guardName()

Get the current authentication guard name.

static StatefulGuard
guard()

Get the current stateful authentication guard.

static bool
shouldRegisterRoutes()

Determine if Passkeys routes should be registered.

static void
ignoreRoutes()

Configure Passkeys to not register its routes.

static string
migrationPath()

Get the path to the package's migrations.

static string
userHandleSecret()

Get the configured user handle secret.

static void
flushState()

Flush all static state.

Details

at line 43
static string relyingPartyId()

Get the relying party ID.

Return Value

string

at line 72
static void resolveRelyingPartyIdUsing(callable|null $callback)

Register a callback to resolve the WebAuthn relying party ID for the current request.

Boot-only. The callback persists in static state for the worker lifetime and affects every subsequent WebAuthn ceremony.

Parameters

callable|null $callback

Return Value

void

at line 84
static array allowedOrigins()

Get the origins allowed to complete WebAuthn ceremonies.

Return Value

array

at line 116
static void resolveAllowedOriginsUsing(callable|null $callback)

Register a callback to resolve WebAuthn allowed origins for the current request.

Boot-only. The callback persists in static state for the worker lifetime and affects every subsequent WebAuthn ceremony.

Parameters

callable|null $callback

Return Value

void

at line 126
static bool hasRequestAwareAllowedOrigins()

Determine if allowed origins are currently resolved from request-aware state.

Return Value

bool

at line 137
static int timeout()

Get the WebAuthn timeout in milliseconds.

Return Value

int

at line 153
static string passkeyModel()

Get the passkey model class name.

Return Value

string

at line 165
static void usePasskeyModel(string $model)

Set the passkey model class name.

Boot-only. The model class persists in static state for the worker lifetime and affects every subsequent passkey query.

Parameters

string $model

Return Value

void

at line 179
static void authorizeLoginUsing(callable|null $callback)

Register a callback to authorize passkey logins before login.

Boot-only. The callback persists in static state for the worker lifetime and affects every subsequent passkey login.

Parameters

callable|null $callback

Return Value

void

at line 189
static bool allowsLogin(Request $request, Passkey $passkey)

Determine if a passkey-verified user should be allowed to log in.

Parameters

Request $request
Passkey $passkey

Return Value

bool

at line 211
static void redirectUsing(callable|null $callback)

Register a callback to resolve the successful login redirect path.

Boot-only. The callback persists in static state for the worker lifetime and affects every subsequent successful passkey login response.

Parameters

callable|null $callback

Return Value

void

at line 221
static string redirectTo(Request $request)

Resolve the successful login redirect path for this request.

Parameters

Request $request

Return Value

string

at line 237
static string guardName()

Get the current authentication guard name.

Return Value

string

at line 247
static StatefulGuard guard()

Get the current stateful authentication guard.

Return Value

StatefulGuard

at line 263
static bool shouldRegisterRoutes()

Determine if Passkeys routes should be registered.

Return Value

bool

at line 273
static void ignoreRoutes()

Configure Passkeys to not register its routes.

Boot-only. The route registration flag persists in static state for the worker lifetime and affects route bootstrapping.

Return Value

void

at line 281
static string migrationPath()

Get the path to the package's migrations.

Return Value

string

at line 289
static string userHandleSecret()

Get the configured user handle secret.

Return Value

string

at line 313
static void flushState()

Flush all static state.

Return Value

void