Skip to content

Updating passkeys on a user's device (updateUserDetails)

Passkey before a device local name change

Becomes…

Passkey after a device local name change

Use the updateUserDetails function in your frontend code to perform local (device) updates:

frontend/passkeys.ts
import {
isPasskeyUpdateSupport,
updateUserDetails
} from "@passlock/client";
const username = "newUsername@example.com";
const displayName = "My new username";
if (isPasskeyUpdateSupport()) {
// this will update the names in the user's password manager
await updateUserDetails({
tenancyId,
passkeyId,
username,
displayName
});
}