Django-allauth: Authenticate with phone number

Created on 5 Jul 2016  路  12Comments  路  Source: pennersr/django-allauth

Hi guys, I need too authenticate my users via theirs cellphone numbers, how can I do this?

Most helpful comment

@mhipo1364 I changed allauth default login backends to support phone number ( everything else ) based login. I can share it here as pull request.

All 12 comments

Its out of scope of allauth . Use twilio.com instead and you can integrate it with django-all auth. You can learn more at https://django-twilio.readthedocs.io/en/latest/.

@mhipo1364 I changed allauth default login backends to support phone number ( everything else ) based login. I can share it here as pull request.

You should be able to build this on top of allauth, but if there is anything in allauth that makes life difficult for you, please let me know.

I want to authenticate with email or phone number. Can anyone guide me where to change in allauth?
If signup with email, will verify by email.
Signup with number, will verify by sms.

@itmard Is your code that supports mobile number as one of the backends available publicly? It'll be useful for me if it is available. Thank you.

Has anyone found a way to register via mobile? I'm new to Django.

@pennersr From what I can understand, modifying allauth to support phone based authentication requires significant work. It would required modifying the allauth code too. One can always extend allauth but the effort would be much more and would require overriding almost all forms for signup, login etc. If someone is ready to modify allauth to support phone number based authentication and signup, would be you open to integrate the pull request?

@divick I think this is more suited to be built on top of allauth instead of within. The requirements are too diverse. Also, you'll likely need to support multiple backends, like Twilio and so on.

I don't think there is anything in the way that makes life difficult in trying to build this on top of allauth. If there is, I would be happy to discuss and accept a pull request to streamline things.

@itmard cna you share your code ?

Wouldn't it be possible to build a twilio-sms backend for django-allauth?

are any progress to include mobile phone SMS auth ?

@pennersr I see that this is requested quite a few times. I came to this page hoping to find a solution too. Apart from this, another useful login provider could be something like a Magic Link or a Password-less Email login.
I would love to help you with the password-less email login, it wouldn't have the problem of multiple backends you mentioned here

@divick I think this is more suited to be built on top of allauth instead of within. The requirements are too diverse. Also, you'll likely need to support multiple backends, like Twilio and so on.

As for mobile login, would you consider the idea of providing an abstract class that would define the expected behaviours for an SMS service backend and then asking the user to implement the class however they want and using settings variable to access the concrete class that the user implemented? (let me know if this is a bad suggestion, just looking for ways to contribute).

If you are okay with this idea, I would love to help you in this process.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JohnnyKing94 picture JohnnyKing94  路  4Comments

gitdeepak picture gitdeepak  路  5Comments

psychok7 picture psychok7  路  5Comments

nlubega picture nlubega  路  4Comments

ConorMcGee picture ConorMcGee  路  5Comments