-
Notifications
You must be signed in to change notification settings - Fork 324
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
Resend Activation Email #44
Comments
I had issues with this not too long ago. the problem is I thought Django-rest-auth or Dj-rest-auth handles it for users, but that is not the case. in my case, I had to set up a view for this. this is what my view looked like for requesting new verification email
my url.py
and when making the request to the API, you just pass the email as shown below, and if the email is already verified, it will not send new verification email, but if not verified, it will send the confirmation email
|
If we're trying to play nice with allauth, this should happen automatically when trying to log in with an unverified email. From docstring for
|
In my case, the EMAIL_VERIFICATION was mandatory and the email didn't send automatically. I also posted this issue on different platforms wasting months with no reply till today. that is how I got to my conclusion. How did you solve yours? did yours send automatically? |
No no, I was tracking down why it wasn't sending and landed here. Just added that as a note in case anyone is looking at fixing this. Would be a little more seamless without an extra view. I'll probably use your solution as a starting point for now. Thanks for posting that! |
It's a good workaround, I think we need to write a view inside dj-rest-auth, Maybe I will make a pull request soon. |
Pull requests are welcome 👍 . Don't forget tests. |
|
If you set correctly, your email settings : |
It doesn't work automatically for optional email verification, that I'm sure of. I think it's either you write a new view or update the login view for dj-rest-auth. I prefer the former to avoid too many unneccessary emails. |
@chymdyugah When you register, do get any error on your logs? |
@escaper01 errors? No. I get the email. I was saying when you login, you don't get the email again if you have it set to 'optional' |
Neither is it re-sent with 'mandatory' (at least for me). I use console backend, it's for sure not because of some misconfiguration of email... |
Why is this issue still open? I see there is ResendEmailVerificationView in dj_rest_auth.registration.views ... |
Are we sure this view really works? I get the following error when I POST email to http://127.0.0.1:8000/auth/registration/resend-email/
I see there's no such attribute or method in the view extending CreateAPIView. Maybe we should add that attribute. My temporary solution:
|
@aladagemre how were you able to by pass this error I am trying to use your code snippet but can't seem to import logger |
@femiir Put the following somewhere at the top: import logging
logger = logging.getLogger(__name__) |
thank you so much |
Seems to be fixed by #332 |
An endpoint already exists for this on version 5.0.2 |
Just like the title.
The text was updated successfully, but these errors were encountered: