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

improvement: register with magic link #795

Closed
wants to merge 1 commit into from
Closed

improvement: register with magic link #795

wants to merge 1 commit into from

Conversation

zachdaniel
Copy link
Collaborator

registering with magic link turns the read action used to request a magic link into an upsert action.

improvement: support auto_confirm_actions on confirmation addon

these actions will automatically apply their confirmation attribute, and will not invoke the sender

improvement: support ignore_actions on confirmation addon

these actions will not apply their confirmation attribute, and will not invoke the sender

Closes #554

registering with magic link turns the read action used to request a magic link into an upsert action.

improvement: support `auto_confirm_actions` on confirmation addon

these actions will automatically apply their confirmation attribute, and will not invoke the sender

improvement: support `ignore_actions` on confirmation addon

these actions will not apply their confirmation attribute, and will not invoke the sender
@zachdaniel
Copy link
Collaborator Author

Well. I implemented this as upserts and then I found the issue mentioning this and reading your explanation of how it ought to be done I now know that I did it completely wrong 😆

@zachdaniel
Copy link
Collaborator Author

zachdaniel commented Oct 9, 2024

Maybe? I'm actually not sure. The benefits of doing it as an upsert like this are that it can be done atomically. If we do a read, then create a sign up token, we introduce race conditions/potential weird behavior, like having to handle cases where you've requested a token, not used it, signed up using email, in which case it would look like you're trying to sign up for an account that exists.

This way is quite simple by comparison.

@zachdaniel
Copy link
Collaborator Author

As I'm implementing protections around upserting against unconfirmed users, I'm even more convinced that an upsert is the right call here. Because then we get immediate feedback that the user already has an account.

@zachdaniel
Copy link
Collaborator Author

Alright, now I'm not so sure 😆 @jimsynz lets circle back, we can discuss how this has all gone for me and figure out a way forward :)

@zachdaniel
Copy link
Collaborator Author

Alright, just going to close this. It was done incorrectly :D

@zachdaniel zachdaniel closed this Oct 9, 2024
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

Successfully merging this pull request may close these issues.

Add support for registration to magic link strategy
1 participant