0

I have my app build with Django Rest and Angular. I am using django-allauth and django-rest-auth modules for handling Users data.

Upon registration I am sending verification key to the email address of the user. The link that the user recieves is in the following format: mydomain/api/rest-auth/registration/verify-email/:key

I am aware that django-rest-auth provides /registration/verify-email endpoint but am not sure how to get the verification code from the email message in the Angular controller and post it to the endpoint.

I guess this is more a question of design.

Thanks!

  • _am not sure how to get the verification code from the email message in the Angular controller_ this is when used will click on verification link? Please correct me! – Anand G Jan 22 '16 at 09:38
  • Yes Anand, that is correct. – Martin Stojcheski Jan 22 '16 at 09:52
  • You can collect URL and params in `$location.path()`. In this you will get your verification code as well. I could help with code but your have not shown any! – Anand G Jan 22 '16 at 10:15
  • Actually I needed to remove the django-allauth urls from urls.py file in my Django app. This module is serving default django view with verification form. As soon as I removed them, I could catch the user request in my angular app. This was my bad, and I will post part of the code as an example. Thanks for your help! – Martin Stojcheski Jan 22 '16 at 10:46

0 Answers0