firebase-as3 icon indicating copy to clipboard operation
firebase-as3 copied to clipboard

Firebase Phone Auth

Open benkhachouch opened this issue 8 years ago • 3 comments

Thanks you for your good job!

Do you know Firebase Phone Auth

if yes, Do you plan to add it?

benkhachouch avatar May 26 '17 09:05 benkhachouch

Hi,

I just read about it. There's one thing that might be a problem, the recaptcha process.

A workaround would be to host the html and JavaScript in Firebase Hosting and load it using StageWebView.

If there's a pure REST API I will try to add it.

agentphantom avatar May 28 '17 19:05 agentphantom

good new. recaptcha can be invisible. Here the demo

https://fir-ui-demo-84a6c.firebaseapp.com/

Le 28 mai 2017 21:43, "Mr. Phantom" [email protected] a écrit :

Hi,

I just read about it. There's one thing that might be a problem, the recaptcha process.

A workaround would be to host the html and JavaScript in Firebase Hosting and load it using StageWebView.

If there's a pure REST API I will try to add it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PhantomAppDevelopment/firebase-as3/issues/15#issuecomment-304535741, or mute the thread https://github.com/notifications/unsubscribe-auth/AMYpy7WpOqTHgPstg7Wzyd-wAFcANzeMks5r-c5mgaJpZM4NnZH4 .

benkhachouch avatar May 29 '17 15:05 benkhachouch

Thanks!

In the last hours I have been studying how it works and I almost got it working.

I will explain what I got and what failed:

When you start a Phone Auth, Firebase connects to the Google Identity Toolkit and retrieves a recaptchaToken and a recaptchaSiteKey.

Then Firebase exchanges those with the Google Recaptcha Server for another recaptchaToken. This is where I failed, I wasn't able to find a way to get this new token.

Then you need to send to Google Identity Toolkit the new recaptchaToken and the Phone Number with the country code. You will receive a session id.

Finally you send to another Google Identity Toolkit the verification code and the session id from the previous request and the user gets registered.

agentphantom avatar May 29 '17 18:05 agentphantom