django-phone-verify
                                
                                 django-phone-verify copied to clipboard
                                
                                    django-phone-verify copied to clipboard
                            
                            
                            
                        Add docs regarding how to integrate it with django Signup
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?
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!
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 ?
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!
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
Hi, As far as I could understand, this documentation helps with api. What if I have just a django web application.
Hi @uditvashisht
Can you please elaborate on what you're looking for? Can you explain your use case?
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.
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.