passkeyRegister

Starts registering a passkey (WebAuthn/FIDO2) for a user. Call CFPasskey.startRegistration() in JavaScript to prompt the browser.

passkeyRegister(userStruct, configStruct) → returns void

This function requires Adobe ColdFusion 2025.0.8 and up.  Not supported on Lucee, etc.

Argument Reference

userStruct struct
Required

Struct describing the user. name (such as an email address) is required. Optional keys: displayName, id, rpName, rpId, userVerification, authenticatorAttachment, requireResidentKey and attestation.

configStruct struct
Required

Struct with optional keys successHandler and errorHandler (JavaScript function names), redirectUrl (page that receives ?passkey_token=) and service (CFC used to store credentials; defaults to /CFIDE/passkey/DefaultPasskey.cfc, which is for development only).

Examples
Sample code invoking the passkeyRegister function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub