update
Updates metadata for an existing passkey registration (e.g. sets a user-friendly display name). Calls the PUT /sdk/v1/webauthn/update/{webauthn_registration_id} endpoint.
Kotlin:
StytchConsumer.passkeys.update(
id = "webauthn-registration-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
request = WebAuthnUpdateParameters(name = "My iPhone"),
)Content copied to clipboard
iOS:
let params = WebAuthnUpdateParameters(name: "My iPhone")
let response = try await StytchConsumer.passkeys.update(
id: "webauthn-registration-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
request: params
)Content copied to clipboard
React Native:
StytchConsumer.passkeys.update(
"webauthn-registration-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
{ name: "My iPhone" }
)Content copied to clipboard
Return
WebAuthnUpdateResponse containing the updated registration.
Parameters
id
The unique ID of the WebAuthn registration to update.
request
IWebAuthnUpdateParameters
name— A human-readable display name for the passkey (e.g."My iPhone").
Throws
PasskeysUnsupportedError
if passkeys are not supported on the current platform.
StytchError
if the registration ID does not exist or the request fails.
if the coroutine is cancelled.