Skip to content

Commit 44bf349

Browse files
author
Jiachen Zhao
committed
Fixes the issue that GoogleProvider is using the wrong client_id
Change-Id: I714f33b3b7066c233d4e47cc32db2a49495a8d04
1 parent 7a19fff commit 44bf349

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

auth/src/main/java/com/firebase/ui/auth/AuthFlowFactory.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@
3434
public class AuthFlowFactory {
3535
/**
3636
* Creates the intent that starts the auth flow
37+
*
38+
* IDP Provider instructions:
39+
* Enabling Google Sign In: If you're using Google Services Gradle Plugin, there are no additional
40+
* steps needed. If not, please override the R.string.default_web_client_id
41+
* to provider your google oauth web client id.
42+
* Enabling Facebook Sign In: Please override the R.string.facebook_application_id to provide the
43+
* App Id from Facebook Developer Dashboard
44+
*
3745
* @param context activity context
3846
* @param firebaseApp the FirebaseApp that's to used for the authentication flow
3947
* @param termsOfServiceUrl the URL to the Term of Service page to be present to the user
@@ -70,7 +78,7 @@ public static Intent createIntent(
7078
context.getString(R.string.facebook_application_id)));
7179
} else if (provider.equalsIgnoreCase("google")) {
7280
providerParcels.add(
73-
GoogleProvider.createParcel(firebaseApp.getOptions().getApplicationId()));
81+
GoogleProvider.createParcel(context.getString(R.string.default_web_client_id)));
7482
}
7583
}
7684
return CredentialsInitActivity.createIntent(

auth/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@
6262
<string name="progress_dialog_signing_in">Signing in…</string>
6363
<string name="progress_dialog_signing_up">Signing up…</string>
6464
<string name="facebook_application_id">FACEBOOK-APPID</string>
65+
<string name="default_web_client_id">GOOGLE-WEBCLIENT-ID</string>
6566
</resources>

0 commit comments

Comments
 (0)