Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
☕️ Reasoning
Building off of my thoughts in regards to #1465, I wanted to create a basic demo of what I had in mind. This PR is far from ready to be merged -- it's extremely ugly, incomplete, undocumented code, I know -- but hopefully highlights some level of the functionality that I am looking to enable.
As my ~proposed implementation comment notes, there are quite a few other things I would hope to support prior to merging (obviously in addition to docs, testing, cleanup, etc):
methods
SMS
providers,whatsapp
support, etc. This could be shared with the currentEmail
provider implementation that could be renamed something closer toMagicLink
methods
in addition to email, involving updates to User model and adapters to fetch users by identifier type rather thanemail
only (findUserByEmail
)length=6
,type='alphanumeric'
)Use
apps/dev/otp-example
to explore the functionality in its current state🧢 Checklist
🎫 Affected issues
Old, closed issue requesting the functionality built in.
Token provider that is somewhat different intended built-in functionality (IMO) but also addressing #1465