Following the instructions found in the Firebase docs for configuring a web client application, it says I need to create a new client app in the Google Developers Console. This is fine. However, I already have a client app defined here for my service's Android client app. Each has its own Google Console Client ID and Firebase only lets you input one client ID and client secret with in the Login & Auth section of the Firebase dashboard. Am I missing something or is supporting both web and Android client apps not possible with a single Firebase app?
Is it possible to use Firebase's built in authentication via Google in both a web and an Android client?
1.1k views Asked by Galen At
2
There are 2 answers
0
On
I had two Projects created in the Google Developer Console. One serves the Android Client and another one serves the Web Client. I too faced similar issue/scenario you are facing.
Here is what worked for me. In the firebase login and auth dashboard, I used the Client Id for Android App. So now I do not have a space for giving the Client Id for Web App(which is using another Google Project). None of the Firebase auth method in Web API (except below one) worked in the Web App. But below one worked (one with oAuthToken)
ref.authWithOAuthToken("google", "<ACCESS-TOKEN>", function(error, authData) {
if (error) {
console.log("Login Failed!", error);
} else {
console.log("Authenticated successfully with payload:", authData);
}
});
It appears this was answered in a google group.