firebase-authentication-dotnet icon indicating copy to clipboard operation
firebase-authentication-dotnet copied to clipboard

Phone Number Authentication

Open cabauman opened this issue 6 years ago • 10 comments

Do you have plans to add phone number authentication? If not, would you mind pointing me in the general direction of how I might implement this myself? I can't find anything related in the officail rest docs: https://firebase.google.com/docs/reference/rest/auth

cabauman avatar May 25 '18 15:05 cabauman

As far as I know there is no official documentation for any type of firebase authentication. When implementing the oauth / email authentication, I had to sniff the traffic generated by the official javascript library (using Fiddler). It probably shouldn't be that difficult to do

bezysoftware avatar Jun 01 '18 09:06 bezysoftware

@bezysoftware link above is official documentation indeed but I cant find anything regarding Phone authentication. @cabauman did you find any rest api information for sms authentication. it seems that it is not supported using rest api.

EmilAlipiev avatar Jun 03 '18 11:06 EmilAlipiev

@EmilAlipiev I didn't find anything. I'll probably just end up using Authy or something like that as a fallback

cabauman avatar Jun 07 '18 13:06 cabauman

@cabauman i didnt know about this service. it looks interesting but you still have to pay for sms and email services while firebase offer free option.

EmilAlipiev avatar Jun 07 '18 13:06 EmilAlipiev

Any updates?

mektebi avatar Nov 08 '18 12:11 mektebi

I asked this question to google team directly and they told me that rest API doesnt have phone Auth and they have no plan to implement it over the API.

EmilAlipiev avatar Nov 08 '18 12:11 EmilAlipiev

Thanks Emil. Good to know.

My workaround for my project that needed phone auth was wrapping the Xamarin Android and iOS bindings into a shared API so I could use them from a netstandard library: https://github.com/cabauman/FirebaseAuthWrapper

cabauman avatar Nov 08 '18 12:11 cabauman

I also looked into this and why there is no phone login. I think the lack of support revolves around the fact that if the call is not protected by something like captcha the service could be easily abused! The end point that is starting the process takes a phone number and a recaptcha token

https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?key=YourKey

{"phoneNumber":"+16135556666","recaptchaToken":"03AOLTBLRezJbMZ2K21mdT9rk-BmTc-......w"}

Firebase API have a C++ version for it, wondering how that works?! I might be only for C++ for mobile where the call obtains some hardware identification preventing spam? I wish firebase would create a usecase where this type of login would be possible. Thoughts?

danmincu avatar Feb 03 '20 13:02 danmincu

Another possibility is that they show the captcha inside webview? That's what I intend to do in the v4

bezysoftware avatar Feb 03 '20 17:02 bezysoftware