Firebase Auth in Android WebView - any solutions?

2,058 views
Skip to first unread message

Manish Malik

unread,
Oct 24, 2017, 10:06:52 AM10/24/17
to Firebase Google Group
Hi,

Is there any solution to make Firebase Auth work in Android WebView (not Cordova) ? I have seen some old threads about this where it was mention that a solution was being investigated, but I've not seen anything post that.

Thanks.

Bassam

unread,
Oct 24, 2017, 4:57:17 PM10/24/17
to Firebase Google Group
Hi Manish,
We only support Cordova/Ionic webview environments. Embedded webviews are generally insecure as you can't tell them apart (all apps will have the origin file://assets/....index.html. You have the ability to signInWithCredential using an OAuth access token. You could use third party libraries that can work in a webview to handle the OAuth flow and then pass the OAuth credential to complete sign-in with Firebase Auth signInWithCredential.

Best regards,
Bassam

Manish Malik

unread,
Oct 28, 2017, 3:20:08 AM10/28/17
to Firebase Google Group
Thanks, Bassam. The signInWithCredential  approach would work.

I also happened to discover that the Cordova Firebase auth works properly with a locally compiled build (and doesn't work [1] with a Phonegap Build one), so that clears the way for me to use Cordova Firebase auth itself. I'll proceed to use that.

Reply all
Reply to author
Forward
0 new messages