firebase-admin-node icon indicating copy to clipboard operation
firebase-admin-node copied to clipboard

Phone number authentication via REST API using firebase

Open dipeshrane24 opened this issue 3 years ago • 1 comments
trafficstars

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.

dipeshrane24 avatar Sep 04 '22 14:09 dipeshrane24

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.

google-oss-bot avatar Sep 04 '22 14:09 google-oss-bot

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.

prameshj avatar Nov 21 '22 23:11 prameshj

The client identifier tokens are obtained via the client SDKs, so this is not really supported via rest APIs.

prameshj avatar Nov 21 '22 23:11 prameshj