sendMobileOTP()
Sends a mobile OTP via SMS. Will register the account if it doesn't already exist
Parameters
phonerequired
string
The user's phone number WITH international prefix
optionsrequired
object
No description provided.
captchaTokenoptional
string
No description provided.
shouldCreateUseroptional
boolean
No description provided.
Properties
Notes
- Requires a
service_role
key. - This function should only be called on a server. Never expose your
service_role
key in the browser.
Examples
Basic example.
const { data: user, error } = await supabase.auth
.api
.sendMobileOTP('12345879')