-
Notifications
You must be signed in to change notification settings - Fork 1
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
Rework email confirmation #38
Comments
Example of function to generate frontend URLs: def reverse_landing(route, **kwargs):
"""Generate a landing (frontend) URL.
This is useful to create links for email invitations or PDF generation,
without hard-coding the frontend URL patterns in multiple locations.
"""
routes = {
'home': '/home',
'todo-list': '/tasks',
'todo-detail': '/tasks/{id}',
'invite-detail': '/invite/{token}',
}
base_url = routes[route].format_map(kwargs)
site_domain = settings.FRONTEND_DOMAIN
return f'https://{site_domain}{base_url}' Add a small template tag that calls this function and you can write your email template. |
merwok
added a commit
that referenced
this issue
Oct 18, 2018
merwok
added a commit
that referenced
this issue
Oct 24, 2018
merwok
added a commit
that referenced
this issue
Oct 30, 2018
merwok
added a commit
that referenced
this issue
Oct 30, 2018
merwok
added a commit
that referenced
this issue
Nov 7, 2018
merwok
added a commit
that referenced
this issue
Nov 7, 2018
merwok
added a commit
that referenced
this issue
Nov 10, 2018
Co-authored-by: Julien Labonté <julien.labonte3@gmail.com>
@just1602 I added item 4, what do you think would be cleaner? |
We should definitively find a way to make the confirmation independent from the the signup process. We should have two flows:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issues in current email confirmation code:
rest-framework-auth-toolkit/rest_auth_toolkit/views.py
Lines 51 to 57 in e7a2319
Email confirmation should be optional (for projects that want to accept signups immediately, or validate the email with other methods). At the moment there is a setting for this, but a test fails if no EmailConfirmation class is defined (caused by Impossible to use login view without configuring signup view #11).
For projects where the website (JS dynamic site) and the API have separate domain names, we can’t use routes and reverse to create the URL in the email; another function should be used to generate frontend URL (example below).
Provide an API view to receive the confirmation token sent by the frontend.
If confirmation fails, the user can’t sign up again with the same address. We could change signup to use get_or_create; add an endpoint to re-send the email; punt until Generate email tokens without using the database #19 is solved; something else.
The text was updated successfully, but these errors were encountered: