-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add support for registration to magic link strategy #554
Comments
I did some thinking about this. The way it currently works is that if you request a magic link it checks that the user exists, and then emails them a link. In order to continue working this way we'd have to change it to an upsert, which means we'd be creating user records for every address ever typed into the form. I think the better solution is to generate a token without a subject and store the email address in the token resource until the token expires. That way we could upsert the user when the token is validated. This would be a bit of a change to the current behaviour, so I am keen for feedback before I try and dive in. |
The suggestion above sounds like the way to go! I'd love to be able to start using just magic links instead of requiring a password on registration as well 🙏 😅 |
Context
This originally came from https://elixirforum.com/t/using-magic-links-for-registration/61166. It may also require changes to Ash Authentication Phoenix.
Problem
The magic link strategy doesn't support registration. It can only be used to sign in existing users/resources.
Why?
It's not possible to use the magic link strategy as a primary form of auth, you still need another strategy for registration.
Possible Solution
Look at other strategies for inspiration and add a registration action (and anything needed to support it).
The text was updated successfully, but these errors were encountered: