Skip to content

Add Credential Manager to Auth samples #610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 14, 2025
Prev Previous commit
Next Next commit
Update auth/app/src/main/java/com/google/firebase/quickstart/auth/kot…
…lin/GoogleSignInActivity.kt

Co-authored-by: Rosário P. Fernandes <rosariopf@google.com>
  • Loading branch information
marinacoelho and thatfiredev authored Feb 14, 2025
commit 67fc27242684f25c0987bc5da807f25f10a74b3d
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ class GoogleSignInActivity : AppCompatActivity() {
// [START create_credential_manager_request]
// Instantiate a Google sign-in request
val googleIdOption = GetGoogleIdOption.Builder()
// Your server's client ID, not your Android client ID.
.setServerClientId(getString(R.string.default_web_client_id))
// Only show accounts previously used to sign in.
.setFilterByAuthorizedAccounts(true)
.setServerClientId(baseContext.getString(R.string.default_web_client_id))
.build()

// Create the Credential Manager request
Expand Down
Loading