Skip to content

Kirby 6.0.0

$webauthn->getCreateArgs()

generates the object for a key registration provide this data to navigator.credentials.create

$webauthn->getCreateArgs(string $userId, string $userName, string $userDisplayName, int $timeout = 20, bool|string $requireResidentKey = false, bool|string $requireUserVerification = false, bool|null $crossPlatformAttachment = null, array $excludeCredentialIds = []): stdClass

Parameters

Name Type Default Description
$userIdrequired string no default value
$userNamerequired string no default value
$userDisplayNamerequired string no default value
$timeout int 20 timeout in seconds
$requireResidentKey boolorstring false 'required', if the key should be stored by the authentication device Valid values: true = required false = preferred string 'required' 'preferred' 'discouraged'
$requireUserVerification boolorstring false indicates that you require user verification and will fail the operation if the response does not have the UV flag set. Valid values: true = required false = preferred string 'required' 'preferred' 'discouraged'
$crossPlatformAttachment boolornull null true for cross-platform devices (eg. fido usb), false for platform devices (eg. windows hello, android safetynet), null for both
$excludeCredentialIds array [] a array of ids, which are already registered, to prevent re-registration

Return type

stdClass

Parent class

Kirby\Auth\Service\Webauthn inherited from lbuchs\WebAuthn\WebAuthn