firebase-admin-node
firebase-admin-node copied to clipboard
Phone number authentication via REST API using firebase
Phone number authentication via REST API.I
I have an app(android/ios) which calls backend api. This backend api will integrate the firebase or using googleapis for otp authentication and then send the otp to the number.
I am using below api at first to get the verification code: https://identitytoolkit.googleapis.com:443/v1/accounts:sendVerificationCode?key=AIzaSyC0XViRhLH9sF6An3XXVHJHrnFNhIN-VAA"
RequestBody:
{ "phoneNumber": "8879373947", }
I am getting MISSING_CLIENT_IDENTIFIER
Guide me about what i am doing wrong as there is little to no documentation on how to accomplish phone number authentication via REST API.
I found a few problems with this issue:
- I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
- This issue does not seem to follow the issue template. Make sure you provide all the required information.
You need to attack either a safetyNet token or Recaptcha token from Android for Phone Auth - https://firebase.google.com/docs/auth/android/phone-auth#enable-app-verification. Similarly you need a suitable client identifier on iOS as described in https://firebase.google.com/docs/auth/ios/phone-auth#enable-app-verification.
The client identifier tokens are obtained via the client SDKs, so this is not really supported via rest APIs.