Coder Social home page Coder Social logo

Comments (4)

dagnelies avatar dagnelies commented on July 28, 2024 1

I recommend taking a look at the v2 preview https://webauthn-ciy.pages.dev/authentication/ to see the ways to log in.

Basically, while "usernameless" authentication is possible, I would not advise it. If you use credentials "discovery", the user will see passkeys with cryptic names, and if you want to trigger authentication directly using the list of allowed credentials, you still need a way to identify the user and poll the server for the credential IDs.

from webauthn.

dagnelies avatar dagnelies commented on July 28, 2024 1

That is correct.

Yes, you should keep a list of credentials for the user on the server side.

During authentication, you have two options:

  • provide an empty credential IDs list => This will trigger "credential discovery" on the client device and the user can pick any available passkey
  • provide the list of allowed credential IDs => The first one also present on the client device will be taken

Note that the exact behavior / UX depends on the platform (and to a lesser extend also the browser).

from webauthn.

mstaicu avatar mstaicu commented on July 28, 2024

Do I have to explicitly "use credential discovery", or that feature is up to the platform / authenticator? My understanding is that after I register the user I create a User in my database and add the credential to his 'devices' array, for example, then in order to authenticate him, I leave the credentials as an empty array on the client side, the authenticator will return a credential, I will send the credential to the server, find a user matching that credential, and the authentication process is complete. Is this a correct understanding?

from webauthn.

mstaicu avatar mstaicu commented on July 28, 2024

Thank you!

from webauthn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.