Back

getting empty secret using createPhoneToken

  • 0
  • Apple
  • Cloud
Alcantro
1 Aug, 2024, 14:08

Hi, I want to implement authentication using only phone number. Here is me sending token to phone: export const sendPhone = async(phone)=>{

const token = await account.createPhoneToken( ID.unique(), phone ); console.log(token); const userId = token.userId; return userId; }

the result of console log: "{"$createdAt": "2024-08-01T14:04:42.769+00:00", "$id": "Id", "expire": "2024-08-01T14:19:42.768+00:00", "phrase": "", "secret": "", "userId": "userId"}"

and I don't get any sms on my phone.

How do I fix this, or what am I doing wrong.

Thank you

TL;DR
Issue: Empty secret and no SMS received while implementing phone authentication with createPhoneToken function. Solution: The empty secret and lack of SMS delivery could be due to missing parameters or incorrect implementation of createPhoneToken function. Check the documentation or validate the input parameters for the function.
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