phone + password (no OTP)?
hey guys, i was in the middle of migrating from supabase auth to better-auth when i hit a snag.
basically i want to allow a single admin user of an orgazniation to create users with phone and password.
then said users can sign in with phone and password, without OTP . I am thinking we will only use OTP for forgot password flows, but since this is a business app, probably just put the onus on the admin to reset forgotten passwords in app.
does anyone know if this is possible with better-auth? i saw a hacky way to do this by using the better-auth user.email field but doesnt feel right
any help would be appreciated!
5 Replies
Yeah you will need to use some work-around since we don't have a native solution to this.
Alternatively you can build your own phone number auth plugin
Im fairly new to engineering in general @Ping my apologies if this sounds ignorant, but would a new plugin be secure? Does this add complexity?
Everything in Better-auth works around plugins, the phone-otp itself is a plugin, for example.
It will add complexity, but so does coding anything in your app
got it @Ping so something like this?
side question: does better-auth have an llms.txt file for context to models during dev?