Repository navigation
webauthnUserID and signals
#805
Replies: 1 comment 2 replies
// I would much rather do this
signalAllAcceptedCredentials({ rpId, userId: 'u1', allAcceptedCredentialIds: ['p1', 'p2'] });
signalCurrentUserDetails({ rpId, name: 'Example', userId: 'u1' });I, uh...huh. So yes, the ideal way to use signals is to have the same user ID value associated with all of a given user's passkeys. But reviewing my guidance in the docs, I see how I may have inadvertently made life difficult for you by auto-generating user IDs on each call. In WebAuthn deployments I've built or talked with others who've built, some kind of system-wide user ID is generated for the user account before the passkey ceremony takes place. That user ID would get consistently used as, specific to SimpleWebAuthn, I don't know how satisfying a response this is, but one way I'd try to fix this problem is to first stop the bleeding by updating your For your existing users you're kinda stuck, though, because there's no signal API to update the user ID associated with a given passkey...that's pretty much an immutable value by design since user ID is used along with RP ID to map user credentials within a FIDO2 authenticator 😔 I also think I need to revisit the Sorry for the bad news here :( |
Uh oh!
There was an error while loading. Please reload this page.
Right now I am using a schema similar to the one described on the website, where each passkey has its own
webauthnUserID. A user can have multiple passkeys.Now if I want to use signals like
signalAllAcceptedCredentialsorsignalCurrentUserDetails, I assume I have to call this multiple times for every passkey, as they have different user ids.Am I understanding this correctly?
Is there a reason why the schema suggests unique
webauthnUserIDper passkey, instead of onewebauthnUserIDon the apps user entity, or even directly using the apps id of the user?All reactions