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

authentication via phone # #194

Closed
davidtlee opened this issue Mar 22, 2015 · 5 comments
Closed

authentication via phone # #194

davidtlee opened this issue Mar 22, 2015 · 5 comments

Comments

@davidtlee
Copy link

Hi, I was wondering whether there's an easy way for me to base authentication on a phone # column. Basically, I would add a phone # column to the users table. I would then use twilio to get a confirmation of a user's phone # by texting them a short code. After that, I want them to be able to sign in without the extra step of omniauth authentication or having to type an email and password.

Would this be easy to do on devise_token_auth? If it would need to be customized, could you point me to the files that I should start looking from? Thanks!

@nickL
Copy link
Contributor

nickL commented Mar 25, 2015

You could start by overriding the registrations controller. You can read about controller overrides here:
https://github.com/lynndylanhurley/devise_token_auth#custom-controller-overrides. I think that may help. Though, this feels a little insecure, each user would not have a password at all? Just a phone number (if i follow correctly?)

@jayrmotta
Copy link

I would like to have that too but I couldn't get how I could achieve that by customizing the token validation controller.

Did you made the customization @davidtlee ?

@davidtlee
Copy link
Author

Hey @jayrmotta, I ended up not doing it by phone after all... I didn't want to deal with what happens when people change phone numbers, etc... sorry couldn't be of more help

@Charlie-Hua
Copy link
Contributor

I am about to implement login by phone number and wondering if it can be done this way:

  1. still use email authentication
  2. still use twilio to send confirmation code for user's phone number
    3. make up a 'temp' email address using user's phone number, and make up a password using the confirmation code
  3. register user using the fake email/password

for login, just change user's password every time according to the confirmation code which will be sent to twilio

@zachfeldman
Copy link
Contributor

Hi there @davidtlee ,

In an effort to cleanup this project and prioritize a bit, we're marking issues that haven't had any activity in a while with a "close-in-7-days" label. If we don't hear from you in about a week, we'll be closing this issue. Obviously feel free to re-open it at any time if it's the right time or this was done in error!

If you are still having the issue (especially if it's a bug report) please refer to our new Issue Template to provide some more details to help us solve it.

Hope all is well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants