Handling expired verification when using DJANGO-REST-AUTH

17 views
Skip to first unread message

Opeyemi Odedeyi

unread,
Apr 13, 2020, 1:31:49 PM4/13/20
to Django REST framework
good day, I am using Django-rest-auth package in a project I am building. I have email verification set to mandatory and it expires within 2 days.
My issue is that after I try using the link after it has expired, I get a weird browser error message saying 

```
NoReverseMatch at /api/signup/account-confirm-email/MQ:1j3qDl:rdNt45LkoDhdHsE_OUDFQqW95TY/

Reverse for 'account_login' is not a valid view function or pattern name
```

I would like to get either a redirect to a verification email URL on my api or JSON response message instead, saying that it has expired. Please how do I go about this?

PLEASE NOTE: I am using django-rest-auth

zhong ming wu

unread,
Apr 13, 2020, 1:38:25 PM4/13/20
to django-res...@googlegroups.com
The html page you see is likely a django template in that project `django-rest-auth` .  You should be able to locate and edit that template to your need.

Alternatively, you can write your own endpoint for verification.




--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/90a9058d-983f-44b4-bf49-dfc57dee0f53%40googlegroups.com.

Opeyemi Odedeyi

unread,
Apr 13, 2020, 6:05:57 PM4/13/20
to Django REST framework
yeah i have an endpoint for users to request a new verification email. my problem, as I said earlier, was that I was lost on how to redirect the user instead of getting that error.


On Monday, 13 April 2020 18:38:25 UTC+1, zhong ming wu wrote:
The html page you see is likely a django template in that project `django-rest-auth` .  You should be able to locate and edit that template to your need.

Alternatively, you can write your own endpoint for verification.

On Apr 13, 2020, at 13:31, Opeyemi Odedeyi <opeyemi...@gmail.com> wrote:

good day, I am using Django-rest-auth package in a project I am building. I have email verification set to mandatory and it expires within 2 days.
My issue is that after I try using the link after it has expired, I get a weird browser error message saying 

```
NoReverseMatch at /api/signup/account-confirm-email/MQ:1j3qDl:rdNt45LkoDhdHsE_OUDFQqW95TY/

Reverse for 'account_login' is not a valid view function or pattern name
```

I would like to get either a redirect to a verification email URL on my api or JSON response message instead, saying that it has expired. Please how do I go about this?

PLEASE NOTE: I am using django-rest-auth

--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+unsub...@googlegroups.com.

zhong ming wu

unread,
Apr 14, 2020, 7:56:44 AM4/14/20
to django-res...@googlegroups.com
What I meant is that your code should be able to process `/api/signup/account-confirm-email/MQ:1j3qDl:rdNt45LkoDhdHsE_OUDFQqW95TY/`  

or the equivalent in your custom framework.   Did you write code to process this particular endpoint or your “endpoint” just trigger verification email?


 Also, I don’t think this topic is specifically DRF and therefore should be directed to the group dedicated to django-rest-auth


To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/fbf128db-3509-480e-9e03-8f11fa250945%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages