Closed slucaskim closed 3 years ago
I think you'd have a better time implementing your own custom solution for something like that. Of course, you're free to borrow as much as you want from Passwordless while building it. It's not something the gem supports right now and I think you'll be better off with something completely custom than with forcing it upon Passwordless.
You can configure your own sending mechanism with Passwordless.after_session_save
. Just make it send an SMS instead of an email and it can work 😊
Good luck!
Thanks @mikker ! I'll look into building this myself then.
Hi @mikker, I'm looking to replace my use of devise with a passwordless option, and this gem is looking really promising. Thanks for the great work! I have a question about capabilities. Does this library support the use case of multiple options for matching on the authentication? What I mean is, let's say I have both
email
andphone
attribute on myUser
table, and I want to let my users enter either their email OR phone to receive their magic link (via email and SMS respectively). Would this just be a matter of declaring both aspasswordless_with
, like:or is it more complicated than this?
Another question, how easy would it be to support a temporary code sort of auth, instead of magic links? If I were to add SMS support, I'd prefer to send a 6 digit code which then the user would enter into the app to get their session, rather than a magic link, because they might be trying to sign in on a different device than their phone.
Thanks again for this great gem!