-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
Hey there!
With the move towards passkeys (through the FIDO Alliance, Apple's OS updates, Windows Hello, etc.); I think it would be extremely useful for the larger Ruby community to have Devise support passkeys instead of passwords as an authentication method.
After some initial scanning of the Devise & Omniauth wiki, it feels like passkeys support should be baked into Devise itself; because it explicitly replaces passwords. Getting some guidance on how we should move forward would be invaluable.
Passkeys replace passwords (or alternatively: passkeys replace the mechanism of password exchange)
Unlike Shibboleth, SAML, OAuth, etc.; you're not using an external identity to verify a user, the browser & server exchange a public/private keypair instead of asking the user to generate & remember a password. So it doesn't necessarily fit as an Omniauth strategy.
Passkeys replace multi-factor authentication flows (or alternatively: passkeys use MFA by default)
Unlike the multi-factor extensions listed in the wiki, passkeys replace multi-factor authentication extensions because multi-factor authentication is baked into the passkey exchange ceremony (especially with the userVerification: required flag).
Some relevant links:
- https://fidoalliance.org/passkeys/#faq
- https://webauthn.io
- https://webauthn.guide
- https://github.com/CiTroNaK/webauthn-with-devise/tree/3-passwordless
- https://github.com/cedarcode/webauthn-ruby
Passkeys still use a lot of Devise's features
Since passkeys are simply a replacement for the password mechanism, an app that wants to use passkeys would still ideally want to use the 10 modules listed in devise's feature summary (just tailored for registering passkeys instead of passwords).
How would we proceed?
This is a big change, so it obviously wouldn't happen overnight, but I think for the long-term safety of users (both app that use Devise, and the customers of said apps), decoupling passwords out of Devise and replacing them with passkeys is essential.
I think the roadmap for this would be:
- soft-decouple passwords out of Devise, replacing it with a generic term like "credential"
- Making the credential method Devise uses configurable, defaulting to
:password - Adding passkey support
- Eventually, making new installations default to using
:passkey
Again, getting some guidance on what makes the most sense for Devise would be a huge help. This is a project I believe in, since it raises for floor for everyone, and am happy to help out however I can.