Passkeys
Passkey and WebAuthn credentials
Use the webauthn client to register and authenticate passkeys (WebAuthn credentials).
Build registration and authentication ceremonies with the options and verification methods below.
listCredentials
Section titled “listCredentials”#asynclistCredentials
List all WebAuthn credentials for a user
paramuserIdstring
The user ID to list credentials for
returnsListCredentialsResponse
Paginated credentials.
const response = await scalekit.webauthn.listCredentials('usr_123456');console.log('Credentials:', response.credentials);updateCredential
Section titled “updateCredential”#asyncupdateCredential
Update a WebAuthn credential’s display name
paramcredentialIdstring
The credential ID to update
paramdisplayNamestring
The new display name for the credential
returnsUpdateCredentialResponse
The updated resource.
const response = await scalekit.webauthn.updateCredential( 'cred_123', 'My YubiKey');deleteCredential
Section titled “deleteCredential”#asyncdeleteCredential
Delete a WebAuthn credential
paramcredentialIdstring
The credential ID to delete
returnsDeleteCredentialResponse
Empty on success.
const response = await scalekit.webauthn.deleteCredential('cred_123');console.log('Deleted:', response.success);