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
ImproperlyConfigured registration email verification #17
Comments
Hi 👋, thanks for creating this issue. It looks like the issue you're describing was recorded in issue #290 of the upstream project. Can you see if any of the workarounds in that issue work for you? If not, I'll investigate a fix. |
thanks for your pointer. unfortunately the workaround doesn't work for me... :-( |
@fessacchiotto You need to check endpoints In your case Django is trying to load the template. You need to make a POST request to the What I'm doing is create custom adapter to change the verification domain from Then get the key from URL and make POST request to the endpoint. It's working. Here is the custom adapter
|
hi! @anuj9196 thanks for your reply.
I've tried to make a post request (with the key in the body--which one? the key I've received at registration, the key received in the mail link?--and without key), trough postman this time, not the browser, to the endpoint above found in the mail message, but I don't get anything good... shouldn't I get some kind of json response to process in my vue.js client? I'm afraid I'm missing something... thanks in advance for your help |
I've looked at the source code and read the hint in the url file. I've managed to receive the email link through the vue.js client router (frontend), and from the receiving vue component immediately send an API call to the confirmation endpoint on the backend. thanks for your patience! |
The You need to send the The endpoint you are using to send verification key is not valid. The link received in the email should be routed to the front-end application and from there get the |
I have fixing this issue by override the so in urls.py
|
@iMerica Don't you think there should be a separate API endpoint to verify email address instead of using a template configured from allauth as per Tivix#290 you suggested earlier for workarounds? I see there is an API http://127.0.0.1:8000/dj-rest-auth/registration/verify-email/ which returns ok and doesn't change the verification status. |
Why is this closed? We still have the same issue in latest version. |
I think this issue is related to (or dup of) #180 |
This issue is due to django-allauth's default behavior of calling
from allauth.account.adapter import DefaultAccountAdapter
class AccountAdapter(DefaultAccountAdapter):
def get_email_confirmation_url(self, request, emailconfirmation):
return f'https://mywebsite.com/register/verify/{emailconfirmation.key}'
This avoids all of the need for fake URLs and serving HTML views from the API. This also makes it possible to have the email URL be for a different domain than the backend URL, which is not possible with the default allauth behavior. |
Definitely need to put together an SPA sample for this project, there are many custom modifications needed to make it work with react! I'll try to create a repo for the fronted. |
I know it's been a while but thanks for linking these and saving me a lot of time! |
So ant updates on this? the problem still persists... |
it working for me |
hi! when I try to access the following link in the email confirmation sent on user registration:
http://localhost:8000/dj-rest-auth/registration/account-confirm-email/MQ:1jIgPr:Ayckd0pouL4B-foYgl2wjdSCYOY/
I receive the following error:
Where should I create such a template? how should I name the template? it would be great if you could point me to some documentation or shed some light on how to proceed further. cheers!
The text was updated successfully, but these errors were encountered: