Back

Email OTP + email-password combo

  • 0
  • Auth
  • Web
๐“•๐“ช๐“ต๐“ช๐“ฏ๐“ฎ๐“ต ๐“•๐“ป๐“ฒ๐“ฎ๐“ผ
2 Apr, 2025, 07:24

This might be a strange scenario but I want to know if it's possible I can implement user auth through both the ways in my app: by sending email OTP and by using email id+password combo

Ie, a user can either choose to be sent an OTP on his email or just type in his email id and password while signing in.

I hope that makes sense๐Ÿ˜ญ๐Ÿ˜ญ

TL;DR
null
Darshan Pandya
2 Apr, 2025, 07:48

sure why not? Whats the issue are you facing? You can do something like this -

  1. Show email field > Send OTP Button > account.createEmailToken Refer - https://appwrite.io/docs/products/auth/email-otp
  2. Show email field & Password field > account.createEmailPasswordSession Refer - https://appwrite.io/docs/products/auth/email-password#login
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more