passkey

User name and displayName change for existing passkey


The publicKeyCredentialCreationOptions contains a user object with an id, name, and displayName.

I understand the id is unique and not visible to end users, so it will never change.

However, what about name and displayName? On many platforms, users can change their name, username, and email. How would these fields be updated on the passkey? I do not seem to find a way to do it.


Solution

  • The short answer:

    The long answer with some background:

    More about multiple accounts per domain:

    Until redesign, there is no real good solution. You can just leave these required username fields blank, just dont care and hope that they will not be required in the future and that Apple/Google/Microsoft registration and verification UX flows will not be awkward showing unnecessary text and blank username fields like now... At least not until a user decides to create multiple accounts on your domain for whatever reason. But then he also has to maintain the labels in his pass manager!

    With correct rethink, the solution to your problem would be that you just do not have to do anything: change uid->email or uid->username internally on the server and thats it! The uid->pid->verification key can stay on your server as it was. The user just authenticates to your site as before with "use your passkey" on xyz.com. No new passkeys, no maintaining and micromanaging the pass manager labels of the user is needed.