django-phone-verify icon indicating copy to clipboard operation
django-phone-verify copied to clipboard

Add docs regarding how to integrate it with django Signup

Open uditvashisht opened this issue 6 years ago • 8 comments

Hi, I am not sure how to use it with an existing project. I have a custom user model with a phone number. I want to verify his phone at the time of signup. How to do that?

uditvashisht avatar Aug 02 '19 09:08 uditvashisht

Hi @uditvashisht

We've the default endpoints listed in: https://github.com/CuriousLearner/django-phone-verify/blob/master/phone_verify/docs/api_endpoints.md

You can check the source here: https://github.com/CuriousLearner/django-phone-verify/blob/master/phone_verify/api.py#L13

You can override the verify viewset to register a user if the OTP and session_code passes. You need to add your code below this line: https://github.com/CuriousLearner/django-phone-verify/blob/master/phone_verify/api.py#L13 while overriding this.

Further docs are in progress and would be included soon with the package.

If you've any questions, please feel free to comment below.

Thanks!

CuriousLearner avatar Aug 06 '19 08:08 CuriousLearner

Here are the updated docs on usage: https://github.com/CuriousLearner/django-phone-verify/blob/master/docs/usage.rst

Does that solve your problem, @uditvashisht ?

CuriousLearner avatar Aug 07 '19 19:08 CuriousLearner

I'm marking this issue resolved via #9

If you feel these docs can be improved, or if you've any more questions, please feel free to open a new issue.

Thank you for your contributions!

CuriousLearner avatar Aug 07 '19 19:08 CuriousLearner

The OP didnt answer, but I would like to know how to integrate. (Django Beginner here) Im using AbstractBaseUser, would like to verify before i commit save the user in my view

An example app demonstrating the usage of this module would be really helpful.

Thank you

jayantamadhav avatar Aug 13 '19 12:08 jayantamadhav

Hi, As far as I could understand, this documentation helps with api. What if I have just a django web application.

uditvashisht avatar Aug 27 '19 06:08 uditvashisht

Hi @uditvashisht

Can you please elaborate on what you're looking for? Can you explain your use case?

CuriousLearner avatar Aug 27 '19 07:08 CuriousLearner

I am creating a webapp, for which Mobile Number is Mandatory. So, I want to user to open signup page and fill in all the details (including mobile number) Then, I want the user to be re-directed to the page to fill the OTP. User fills the OTP and if it matches. Regisration is successful.

uditvashisht avatar Aug 27 '19 08:08 uditvashisht

What you've in User's table will be there. A separate table with mobile_number and the security_code would be created which can help you in verifying the number. If you're using APIs, the docs describe how you can override the provided API methods to accomplish this use case here: https://github.com/CuriousLearner/django-phone-verify/blob/master/docs/usage.rst#usage

The same logic applies if you're using the templating system. You can use the same logic in your views.

CuriousLearner avatar Aug 27 '19 09:08 CuriousLearner