Skip to content
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

Django-sesame use case : login with mail + magic link #58

Closed
petijean opened this issue Oct 22, 2020 · 2 comments
Closed

Django-sesame use case : login with mail + magic link #58

petijean opened this issue Oct 22, 2020 · 2 comments

Comments

@petijean
Copy link

Hello,
Would anyone have implemented django-sesame in a django project to enable the solution "login by mail" ?

  • Users without 'username' or 'password'
  • Users would only provide an email adress used to sent them a 'magic link' (whose validity would be time-limited) to sign in or log in
@aaugustin
Copy link
Owner

I told @petijean to post here as I'm not aware of any off-the-shelf solution for this. Apparently no one else does. A search didn't turn up anything.

Solving this requires several parts, but they're all quite straightforward and well documented:

  • make a customer user model that uses the email as username
  • render a form with an email address fields
  • when the form is submitted successfully, generate a link with a token and send an email to the user with that link

The default configuration of django-sesame does the rest.

@aaugustin
Copy link
Owner

Version 3.0 will contain a tutorial with detailed steps to achieve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants