-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor public key credential for tests #42
Refactor public key credential for tests #42
Conversation
So, in theory, they're both WebAuthn Public Key Credentials. I've just used the "Public Key Credential" and "Passkey" terms to differentiate the use-cases. First, the textbook differences:
As you might've gathered already, based on the above, Passkeys are Discoverable Credentials. It's mostly just a marketing-friendly rebrand to indicate they fully replace usernames/passwords. However, there's also some limits, for example, when you have a Roaming Authenticator such as a Yubikey, and use it as a Passkey, you unfortunately risk running into a storage limit, as Yubikeys can only hold 25 "Resident Keys" (read: Discoveable Credentials) due to it being a hardware-based USB-stick-like device. This limit does not exist for non-discoverable credentials, and likely also doesn't exist on Platform Authenticators since they're stored on-device and could in theory be offloaded by the OS. As such, I've split these two textbook differences up into two different terms in the code, and named them accordingly.
While I agree the distinction isn't super clear, especially since it's re-using existing terms, I haven't had the time yet to rename "PublicKeyCredentials" yet, but here's some thoughts I had:
The same applies to the In either case, I don't want to rename these now, as they're honestly just details that are easier to adjust once everything else is implemented (as to prevent merge conflicts on PR's / WIP stuff). It doesn't affect how the code is structured or ran, but at least you have an idea now with regards to what they represent! In summary: there's to some extent a definite difference between the two. Feel free to use these new terms in the tests already, though. Hope this explains! |
Okay. I understood the difference! I agree that it is a good idea to keep them different even if they mostly do similar things. Renaming the MultiFactorCredential Ideas:
|
@Jubeki This one is ready for review as well, right? Or was it still work in progress? |
Just asking, can the
publicKeyCredential()
also be used insubmitPasskeyBasedRegisterAttempt()
they look similar, but I am not sure how they differ exactly.