Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
207 views
in Technique[技术] by (71.8m points)

Firebase "Phone Verified" missing

I'm using firebase sms verification, on success, I call my backend /complete-signup to do more work with the JWT token generated (that depends on user having verified their phone. not just create an account with it.)

Now, as mentioned in this question, there is no isPhoneVerified() method...and getPhoneNumbe() is no help, a user can signup with their phone, skip the verify code step, and their account will still be created on firebase.

Client side validation (SharedPreferences as mentioned in the answer) is no help, since there's no way to communicate that info securely to my backend (or is there?)..because what's preventing the user from calling my backend /complete-signup from curl..

What I'm thinking:

  1. add "phone verified" as custom claim from client (not possible)
  2. create custom token on client contaning {userId,phoneVerified} to send to my backend (super insecure!)
  3. get the value of the otp code sent by firebase in the backend to verify it (not possible)
  4. use another api (really dont want to do this)
  5. ??

ideas?

question from:https://stackoverflow.com/questions/65894388/firebase-phone-verified-missing

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...