firebase sms otp code example
Example 1: how to verify sms token firebase
POST https://www.googleapis.com/identitytoolkit/v3/relyingparty/getAccountInfo?key={FIREBASE_SERVER_KEY}
{
“idToken”: “eyJhbGciOiJEanNZspytaJL4wDZmu2OcwQujC360AJ_Q”
}
//result
{
…,
“users”: [
{
…,
“phoneNumber”: “+351966666666”,
…
}
]
}
Example 2: phone number authentication
$ npm install googleapis