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

Add docs regarding how to integrate it with django Signup #8

Open
uditvashisht opened this issue Aug 2, 2019 · 8 comments
Open

Add docs regarding how to integrate it with django Signup #8

uditvashisht opened this issue Aug 2, 2019 · 8 comments
Labels
documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@uditvashisht
Copy link

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?

@CuriousLearner
Copy link
Owner

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!

GeekyShacklebolt added a commit to GeekyShacklebolt/django-phone-verify that referenced this issue Aug 7, 2019
GeekyShacklebolt added a commit to GeekyShacklebolt/django-phone-verify that referenced this issue Aug 7, 2019
@CuriousLearner
Copy link
Owner

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
Copy link
Owner

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!

@jayantamadhav
Copy link

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

@uditvashisht
Copy link
Author

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

@CuriousLearner
Copy link
Owner

Hi @uditvashisht

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

@uditvashisht
Copy link
Author

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.

@CuriousLearner
Copy link
Owner

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 CuriousLearner added documentation good first issue Good for newcomers help wanted Extra attention is needed labels Aug 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants