Skip to content
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

How should website authors "get or create"? #1533

Closed
lgarron opened this issue Dec 4, 2020 · 5 comments
Closed

How should website authors "get or create"? #1533

lgarron opened this issue Dec 4, 2020 · 5 comments
Assignees

Comments

@lgarron
Copy link
Contributor

lgarron commented Dec 4, 2020

Suppose a site is trying to implement "trusted device" functionality, as suggested at https://w3c.github.io/webauthn/#sctn-authenticator-attachment-modality.

The first registration is easy:

  • Call isUserVerifyingPlatformAuthenticatorAvailable().
  • If so, prompt the user to register a trusted device.

Suppose that the user now signs into another browser that shares the same platform authenticator (e.g. using Windows Hello).

Also suppose that the site would like the user to be able to associate the new browser with the existing trusted device, so that they can be managed together. (Among other things, this allows users to manage and trust actual physical devices like "Alice's Surface Pro" instead of browser sessions.) In this case, the site would need to either get which platform authenticator is associated with the existing device, or create a new one if needed. I see two options:

  • Ask the user to register a device, and let the user run into a duplicate registration error. Then offer the user to associate the device instead.
  • Ask the user "is this a new or an existing trusted device?" and show the corresponding prompt (with a fallback to the other).

Both of these cause "unnecessary" confusion for the user — compare this to the simplicity of authenticator flows for any native mobile app. Is there any way to avoid this, either with the current spec or any likely future changes?

@equalsJeffH
Copy link
Contributor

equalsJeffH commented Dec 8, 2020

I think your answers ought to be addressed in https://github.com/fido-alliance/how-to-fido/blob/master/HowToFIDO.md --- a subtle-but-important aspect of making this work smoothly is for the platform authenticator to support discoverable credentials, such that the RP does navigator.credential.get() using an empty allow list and the platform authnr can find the cred and utilize it, regardless of the browser that's being used at the time.

@lgarron
Copy link
Contributor Author

lgarron commented Dec 8, 2020

I think your answers ought to be addressed in https://github.com/fido-alliance/how-to-fido/blob/master/HowToFIDO.md --- a subtle-but-important aspect of making this work smoothly is for the platform authenticator to support discoverable credentials, such the RP does navigator.credential.get() using an empty allow list and the platform authnr can find the cred and utilize it, regardless of the browser that's being used at the time.

Indeed, I'd love to be able to rely on resident key/client-side discoverable credentials. But since Android Chrome doesn't support them (yet), is there something better if we want to support all the major platform authenticators in the short term?

@ptoomey3
Copy link

ptoomey3 commented Dec 9, 2020

such that the RP does navigator.credential.get() using an empty allow list and the platform authnr can find the cred and utilize it, regardless of the browser that's being used at the time.

Another point that has been fuzzy for me...when would a site know to trigger a call to navigator.credential.get() unless they are tracking state to know that a user has a credential and that a call to navigator.credential.get() is going to be useful? But, if the site is already tracking state to know that navigator.credential.get() is going to be useful, then they could also be tracking state to know which registration they should trigger the flow with anyway. I know there were privacy reasons why the API decided against letting a site query on whether there is a credential for the site available. But, it seems like the net result is that you kinda have to keep track of state to know when to use the API for a given user. And, once that state is lost (i.e. cookies are cleared), the RP is in a bit of a tough spot.

@equalsJeffH
Copy link
Contributor

Though, I failed to note (apologies) that how-to-FIDO does guide one on how to have a good user experience even in the abscence of platform authenticator discoverable credentials. i.e., discoverable credentials are not necessarily essential.

@equalsJeffH
Copy link
Contributor

We suggest further discussion of this be taken up at https://github.com/fido-alliance/how-to-fido/blob/master/HowToFIDO.md since there is not an issue here with the webauthn spec per se, and are closing this issue.

nsatragno added a commit that referenced this issue Jun 29, 2022
Add conditional UI flow

This PR enables a non-modal "conditionally mediated" UI feature for WebAuthn which RPs may utilize to provide a credential selection UI only if the user has a discoverable credential registered with the Relying Party on their authenticator (the latter being the "condition"). The credential is displayed alongside an autofilled username or password input field. This helps RPs solve the "bootstrapping problem" when migrating their user base from traditional username and password to WebAuthn: websites can fire a WebAuthn call while showing their typical username and/or password prompt without worrying about showing a modal dialog error if the device lacks appropriate credentials.

See also:
https://github.com/w3c/webauthn/wiki/Explainer:-WebAuthn-Conditional-UI
Fixes #1545

Overview "omnibus" issue: #1637
See also discussion in Issues #1356 #1533 #1568

Co-authored-by: Nina Satragno <[email protected]>
Co-authored-by: Jeff Hodges <[email protected]>
Co-authored-by: Emil Lundberg <[email protected]>
Co-authored-by: Matthew Miller <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants