Search code examples
ruby-on-railsdevise

Q: Passwordless auth on Rails


Is there a way to setup auth without password where user receives one-time password on every login.

Only auth option for Rails that I know of is Devise but it doesn't seem to support "passwordless" auth.

Are there any other options and am I missing something about devise not supporting it?


Solution

  • You could consider requiring your user to have a Fido U2F compliant device. They need to plug it in on register. and on login. It is more commonly used as 2nd factor authentication. but I can imagine people who might want to use it as a single authentication method. The protocol is web_authn and there is a gem for it in ruby.

    https://github.com/cedarcode/webauthn-ruby

    you can test at https://webauthn.io/

    you could also consider the more common OTP Authenticator app. Have people scan your QR Core on signup, and that would become the only auth required.

    is this what you are asking? Single method of authentication, without a saved password.

    sent everything by email or SMS seems annoying but that is also possible.