Skip to content
Back to skills

Add Google Signin Credential Manager

ASecurity

Add Google Sign-In via Credential Manager API (modern Android auth, replaces deprecated Google Sign-In SDK). Use when the user says 'google sign in android', 'credential manager android', 'auth android'.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 4, 2026
developmentgobashreactapibackend

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 4, 2026

npx -y skills add khadinakbarlabs/expo-mobile-app-builder --skill add-google-signin-credential-manager --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Add Google Signin Credential Manager?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Add Google Signin Credential Manager
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/khadinakbarlabs-add-google-signin-credential-manager/badge)](https://www.skillsdirectory.com/skills/khadinakbarlabs-add-google-signin-credential-manager)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "add-google-signin-credential-manager"
description: "Add Google Sign-In via Credential Manager API (modern Android auth, replaces deprecated Google Sign-In SDK). Use when the user says 'google sign in android', 'credential manager android', 'auth android'."
---

# Google Sign-In via Credential Manager

Modern Android auth API (Android 14+, backports to 4.4). Replaces deprecated Google Sign-In SDK.

## Install
```bash
npm exec --no -- expo install @react-native-google-signin/google-signin
```

## Configure
`app.json`:
```json
{
  "expo": {
    "plugins": [
      ["@react-native-google-signin/google-signin", {
        "iosUrlScheme": "com.googleusercontent.apps.YOUR_CLIENT_ID"
      }]
    ]
  }
}
```

## SHA-1 setup (CRITICAL)
Add BOTH to Firebase / Google Cloud OAuth:
- Upload key SHA-1 (your keystore)
- Play signing key SHA-1 (from Play Console → App integrity)

Without BOTH: works in dev, breaks in prod.

## Implement
```tsx
import { GoogleSignin, statusCodes } from '@react-native-google-signin/google-signin';

GoogleSignin.configure({
  webClientId: 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com',
});

const signIn = async () => {
  try {
    await GoogleSignin.hasPlayServices();
    const userInfo = await GoogleSignin.signIn();
    // userInfo.idToken — send to backend for verification
  } catch (e: any) {
    if (e.code === statusCodes.SIGN_IN_CANCELLED) return;
    throw e;
  }
};
```

## Backend verifies idToken
```ts
import { OAuth2Client } from 'google-auth-library';
const client = new OAuth2Client();
const ticket = await client.verifyIdToken({ idToken, audience: WEB_CLIENT_ID });
const payload = ticket.getPayload();
// payload.sub = stable Google user ID
```

## Common gotchas
- "DEVELOPER_ERROR" → SHA-1 mismatch
- Two web client IDs (Android client + Web client) — use WEB client ID for `webClientId`
- Google Play Services missing on emulator → use one with Play services
- Production builds need Play signing SHA-1 added to OAuth credentials

## Pair with
- `add-supabase-auth-android` (Supabase handles verify)
- `code-signing-android` (SHA-1 extraction)

Files in this skill

  • SKILL.md2.1 KB
  • agents/openai.yaml239 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…