how to do a passwordless login

We collect the user email and then send OTP to the mail address. How can we do that
3 Replies
sen.py
sen.py16mo ago
What are you using for authentication? NextAuth?
sen.py
sen.py16mo ago
Easiest one with NextAuth would be https://next-auth.js.org/providers/email where user only needs to enter their email address and they would get magic link that works one time for login. Bit better than OTP as you dont have to type it. But if you still feel like to generate OTP and ask user to enter here is comment on nextauth issue that describes how to do it https://github.com/nextauthjs/next-auth/issues/709#issuecomment-784077142
GitHub
Magic Passcode · Issue #709 · nextauthjs/next-auth
Your question I'm curious if there's currently a way to have the same behavior as the magic link, but instead send a 4-6 digit code to their email that the user can then enter in themselves...
beebae
beebaeOP16mo ago
Thanks manh I'll check this
Want results from more Discord servers?
Add your server