{"_id":"@ademhatay/expo-google-signin","_rev":"8-aa3a9c96fa1d0b09675a58b10ac72a1b","name":"@ademhatay/expo-google-signin","dist-tags":{"latest":"0.2.22"},"versions":{"0.1.0":{"name":"@ademhatay/expo-google-signin","version":"0.1.0","keywords":["react-native","expo","expo-google-signin","ExpoGoogleSignin"],"author":{"url":"https://github.com/ademhatay","name":"Adem Hatay","email":"hatayadem5@gmail.com"},"license":"MIT","_id":"@ademhatay/expo-google-signin@0.1.0","maintainers":[{"name":"ademhatay","email":"hatayadem5@gmail.com"}],"homepage":"https://github.com/ademhatay/expo-google-signin#readme","bugs":{"url":"https://github.com/ademhatay/expo-google-signin/issues"},"dist":{"shasum":"3cf7f6f4100b0ad70512e9ef33f8e69d85822f9f","tarball":"https://registry.npmjs.org/@ademhatay/expo-google-signin/-/expo-google-signin-0.1.0.tgz","fileCount":44,"integrity":"sha512-YXU4KCPtPZP2AcXU3F88/XHaf8AdP6z5Q1CNMDMay5HYrRogZtY4hPZVeCxOK5Xl38sx4661rMKVTKyMH02Q2w==","signatures":[{"sig":"MEUCIFYX9DUXpa1jec/xYho1rNQ3yW+5xpEJDkRslvcUzOooAiEA56Nb0i+rEXgfEIjcf6tt/Ct3wDUtREuQ4XqOISb+Bdw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":339350},"main":"build/index.js","types":"build/index.d.ts","gitHead":"9275a3398639849e5c773e780b9e50608a8cbad8","scripts":{"lint":"expo-module lint","test":"expo-module test","build":"expo-module build","clean":"expo-module clean","prepare":"expo-module prepare","open:ios":"xed example/ios","expo-module":"expo-module","open:android":"open -a \"Android Studio\" example/android","prepublishOnly":"expo-module prepublishOnly"},"_npmUser":{"name":"ademhatay","email":"hatayadem5@gmail.com"},"repository":{"url":"git+https://github.com/ademhatay/expo-google-signin.git","type":"git"},"_npmVersion":"11.6.0","description":"Google Credential Manager native modules for React Native Expo","directories":{},"_nodeVersion":"24.9.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"expo":"^54.0.18","@types/react":"~19.1.0","react-native":"0.81.5","expo-module-scripts":"^5.0.7"},"peerDependencies":{"expo":"*","react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/expo-google-signin_0.1.0_1761202598594_0.29268843659185295","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@ademhatay/expo-google-signin","version":"0.2.2","keywords":["react-native","expo","google-signin","credential-manager","android","one-tap"],"author":{"url":"https://github.com/ademhatay","name":"Adem Hatay","email":"hatayadem5@gmail.com"},"license":"MIT","_id":"@ademhatay/expo-google-signin@0.2.2","maintainers":[{"name":"ademhatay","email":"hatayadem5@gmail.com"}],"homepage":"https://github.com/ademhatay/expo-google-signin#readme","bugs":{"url":"https://github.com/ademhatay/expo-google-signin/issues"},"dist":{"shasum":"49438a8e918b950463f969cb7c29de84b0dd3369","tarball":"https://registry.npmjs.org/@ademhatay/expo-google-signin/-/expo-google-signin-0.2.2.tgz","fileCount":23,"integrity":"sha512-zbOouhdEy97sUrAq7GI3G+9tSO175p8mqEByTjrKnlqtTNhSCc07HsZWrsLqw+LF4BYvbZRl+Yz/ZXylEdwMOA==","signatures":[{"sig":"MEUCIQCzzQ7RFKhYcfXU/iEXfVR18kB+2rJ3b1XoxSNfFONajQIgezbvmsJ3Hz2FSprlffu/opQAshd5VmQP7UMcxz2bMZc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39227},"main":"build/index.js","types":"build/index.d.ts","gitHead":"177b6c468ce9fb609cbd51b2edbb9836c624b4a5","scripts":{"lint":"expo-module lint","test":"expo-module test","build":"expo-module build","clean":"expo-module clean","prepare":"expo-module prepare","open:ios":"xed example/ios","expo-module":"expo-module","open:android":"open -a \"Android Studio\" example/android","prepublishOnly":"expo-module prepublishOnly"},"_npmUser":{"name":"ademhatay","email":"hatayadem5@gmail.com"},"repository":{"url":"git+https://github.com/ademhatay/expo-google-signin.git","type":"git"},"_npmVersion":"11.6.0","description":"Google Credential Manager native modules for React Native Expo","directories":{},"_nodeVersion":"24.9.0","dependencies":{"expo-modules-core":">=1.13.0"},"_hasShrinkwrap":false,"devDependencies":{"expo":"^54.0.18","@types/react":"~19.1.0","react-native":"0.81.5","expo-module-scripts":"^5.0.7"},"peerDependencies":{"expo":"*","react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/expo-google-signin_0.2.2_1761372598031_0.1827008687743914","host":"s3://npm-registry-packages-npm-production"}},"0.2.21":{"name":"@ademhatay/expo-google-signin","version":"0.2.21","keywords":["react-native","expo","google-signin","credential-manager","android","one-tap"],"author":{"url":"https://github.com/ademhatay","name":"Adem Hatay","email":"hatayadem5@gmail.com"},"license":"MIT","_id":"@ademhatay/expo-google-signin@0.2.21","maintainers":[{"name":"ademhatay","email":"hatayadem5@gmail.com"}],"homepage":"https://github.com/ademhatay/expo-google-signin#readme","bugs":{"url":"https://github.com/ademhatay/expo-google-signin/issues"},"dist":{"shasum":"a168a8e868d75335acdb0fb465a46ad80789b0e4","tarball":"https://registry.npmjs.org/@ademhatay/expo-google-signin/-/expo-google-signin-0.2.21.tgz","fileCount":23,"integrity":"sha512-XWUy+MebxzXDjjeW2LIwCxc5bdtrYzmIrIx5ay+Ph9mdMUC6hEUijM+CkFv07HaLHLpphsxuekYz9mRz3BzqUg==","signatures":[{"sig":"MEUCIGg9d8EZAfeH48+GHM9sWkpcu1MVhcjvxI0UVsDg5o1yAiEA+8xfyk7eD+mn/0cmj6+fWVcnIt6Ik7UWRvbn1hYYYLQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39222},"main":"build/index.js","types":"build/index.d.ts","gitHead":"f2bcbe979bbcad347f629a86faf06b5769c4e734","scripts":{"lint":"expo-module lint","test":"expo-module test","build":"expo-module build","clean":"expo-module clean","prepare":"expo-module prepare","open:ios":"xed example/ios","expo-module":"expo-module","open:android":"open -a \"Android Studio\" example/android","prepublishOnly":"expo-module prepublishOnly"},"_npmUser":{"name":"ademhatay","email":"hatayadem5@gmail.com"},"repository":{"url":"git+https://github.com/ademhatay/expo-google-signin.git","type":"git"},"_npmVersion":"11.6.0","description":"Google Credential Manager native modules for React Native Expo","directories":{},"_nodeVersion":"24.9.0","dependencies":{"expo-modules-core":">=1.13.0"},"_hasShrinkwrap":false,"devDependencies":{"expo":"^54.0.18","@types/react":"~19.1.0","react-native":"0.81.5","expo-module-scripts":"^5.0.7"},"peerDependencies":{"expo":"*","react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/expo-google-signin_0.2.21_1761472088250_0.5627151520923293","host":"s3://npm-registry-packages-npm-production"}},"0.2.22":{"name":"@ademhatay/expo-google-signin","version":"0.2.22","description":"Google Credential Manager native modules for React Native Expo","main":"build/index.js","types":"build/index.d.ts","scripts":{"build":"expo-module build","clean":"expo-module clean","lint":"expo-module lint","test":"expo-module test","prepare":"expo-module prepare","prepublishOnly":"expo-module prepublishOnly","expo-module":"expo-module","open:ios":"xed example/ios","open:android":"open -a \"Android Studio\" example/android"},"keywords":["react-native","expo","google-signin","credential-manager","android","one-tap"],"repository":{"type":"git","url":"git+https://github.com/ademhatay/expo-google-signin.git"},"bugs":{"url":"https://github.com/ademhatay/expo-google-signin/issues"},"author":{"name":"Adem Hatay","email":"hatayadem5@gmail.com","url":"https://github.com/ademhatay"},"license":"MIT","homepage":"https://github.com/ademhatay/expo-google-signin#readme","dependencies":{"expo-modules-core":">=1.13.0"},"devDependencies":{"@types/react":"~19.1.0","expo-module-scripts":"^5.0.7","expo":"^54.0.18","react-native":"0.81.5"},"peerDependencies":{"expo":"*","react":"*","react-native":"*"},"gitHead":"fcb06c95f1d4111286c0b497bae144aa5cb5b535","_id":"@ademhatay/expo-google-signin@0.2.22","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-rqcct2rHtDySo8XrAdvsxMgSt0h65iaXabSH6Btff+JxbwNQbRFR/I90HbjQILK3uFqJxmGYb/ZwugKEQN1RhA==","shasum":"05079606a1767714228a0d17d12d32056540c99e","tarball":"https://registry.npmjs.org/@ademhatay/expo-google-signin/-/expo-google-signin-0.2.22.tgz","fileCount":27,"unpackedSize":41377,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDIo7EglNfoRuABgywhL0ph9yVUQGErCxZIvDfZtjB9dgIgCOv+5CCnbo7W5KJKaYrtZKarxbquX1fnx6P4lxQbPqE="}]},"_npmUser":{"name":"ademhatay","email":"hatayadem5@gmail.com"},"directories":{},"maintainers":[{"name":"ademhatay","email":"hatayadem5@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/expo-google-signin_0.2.22_1770491037701_0.9870116190089218"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-23T06:56:38.514Z","modified":"2026-02-07T19:03:57.967Z","0.1.0":"2025-10-23T06:56:38.894Z","0.2.0":"2025-10-25T06:00:10.946Z","0.2.1":"2025-10-25T06:05:35.700Z","0.2.2":"2025-10-25T06:09:58.226Z","0.2.21":"2025-10-26T09:48:08.490Z","0.2.22":"2026-02-07T19:03:57.845Z"},"bugs":{"url":"https://github.com/ademhatay/expo-google-signin/issues"},"author":{"name":"Adem Hatay","email":"hatayadem5@gmail.com","url":"https://github.com/ademhatay"},"license":"MIT","homepage":"https://github.com/ademhatay/expo-google-signin#readme","keywords":["react-native","expo","google-signin","credential-manager","android","one-tap"],"repository":{"type":"git","url":"git+https://github.com/ademhatay/expo-google-signin.git"},"description":"Google Credential Manager native modules for React Native Expo","maintainers":[{"name":"ademhatay","email":"hatayadem5@gmail.com"}],"readme":"<a id=\"readme-top\"></a>\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n<br />\n<div align=\"center\">\n  <h3 align=\"center\">@ademhatay/expo-google-signin</h3>\n\n  <p align=\"center\">\n    Native Google Sign-In for Expo / React Native on Android and iOS.\n    <br />\n    Android: Credential Manager (One Tap + Google button flow)\n    <br />\n    iOS: GoogleSignIn native SDK\n    <br />\n    <a href=\"https://github.com/ademhatay/expo-google-signin\"><strong>Explore the docs »</strong></a>\n    <br />\n    <br />\n    <a href=\"https://github.com/ademhatay/expo-google-signin/issues/new?labels=bug\">Report Bug</a>\n    ·\n    <a href=\"https://github.com/ademhatay/expo-google-signin/issues/new?labels=enhancement\">Request Feature</a>\n  </p>\n</div>\n\n<details>\n  <summary>Table of Contents</summary>\n  <ol>\n    <li>\n      <a href=\"#about-the-project\">About The Project</a>\n      <ul>\n        <li><a href=\"#built-with\">Built With</a></li>\n      </ul>\n    </li>\n    <li>\n      <a href=\"#getting-started\">Getting Started</a>\n      <ul>\n        <li><a href=\"#prerequisites\">Prerequisites</a></li>\n        <li><a href=\"#installation\">Installation</a></li>\n      </ul>\n    </li>\n    <li><a href=\"#google-cloud-setup-required\">Google Cloud Setup (Required)</a></li>\n    <li><a href=\"#usage\">Usage</a></li>\n    <li><a href=\"#api-reference\">API Reference</a></li>\n    <li><a href=\"#troubleshooting\">Troubleshooting</a></li>\n    <li><a href=\"#contributing\">Contributing</a></li>\n    <li><a href=\"#license\">License</a></li>\n  </ol>\n</details>\n\n## About The Project\n\n`@ademhatay/expo-google-signin` provides a single JS API (`signIn`, `signOut`) and native implementations for both platforms:\n\n- Android: modern Credential Manager flow (`One Tap` and explicit `Google button flow`)\n- iOS: official `GoogleSignIn` native SDK\n\nThis lets you keep one auth integration across platforms while still using platform-native UX.\n\n### Built With\n\n- [Expo Modules](https://docs.expo.dev/modules/overview/)\n- [React Native](https://reactnative.dev/)\n- [AndroidX Credential Manager](https://developer.android.com/identity/sign-in/credential-manager)\n- [Google Identity Services for Android](https://developers.google.com/identity/android-credential-manager)\n- [GoogleSignIn iOS SDK](https://developers.google.com/identity/sign-in/ios)\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js LTS (`20` or `22` recommended)\n- Expo SDK / React Native project\n- Google Cloud project\n\n### Installation\n\nExpo managed or prebuild:\n\n```bash\nnpx expo install @ademhatay/expo-google-signin\n```\n\nBare React Native / Expo bare:\n\n```bash\nnpm install @ademhatay/expo-google-signin\n# or\nbun add @ademhatay/expo-google-signin\n```\n\nRebuild native apps after install:\n\n```bash\nnpx expo run:android\nnpx expo run:ios\n```\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n## Google Cloud Setup (Required)\n\nYou must create OAuth clients in the same Google Cloud project.\n\n### 1) Create Web OAuth Client (Required for all platforms)\n\nCreate `OAuth client ID` with type `Web application`.\n\nUse this value as:\n\n- `serverClientId` in `signIn(options)`\n\nImportant: `serverClientId` must be **Web Client ID**, not Android/iOS client ID.\n\n### 2) Create Android OAuth Client\n\nCreate `OAuth client ID` with type `Android` and enter:\n\n- Package name (exactly your Android app package)\n- SHA-1 certificate fingerprint(s)\n\nGet SHA-1:\n\n```bash\ncd android\n./gradlew signingReport\n```\n\nAdd all relevant SHA-1 values (debug/release/play signing if applicable).\n\n### 3) Create iOS OAuth Client\n\nCreate `OAuth client ID` with type `iOS` and enter:\n\n- Bundle identifier (must match your iOS app bundle ID)\n\n### 4) Configure OAuth Consent Screen\n\nIf app is in `Testing`, add test user emails.\n\n### 5) Configure Expo plugin for iOS\n\nIn your app config (`app.json` or `app.config.ts`), add plugin with iOS client ID:\n\n```json\n{\n  \"expo\": {\n    \"plugins\": [\n      [\n        \"@ademhatay/expo-google-signin\",\n        {\n          \"iosClientId\": \"YOUR_IOS_CLIENT_ID.apps.googleusercontent.com\"\n        }\n      ]\n    ]\n  }\n}\n```\n\nThis writes `GIDClientID` and required URL scheme into Info.plist during prebuild.\n\nThen rebuild iOS native project.\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n## Usage\n\n```ts\nimport { signIn, signOut } from '@ademhatay/expo-google-signin';\n\nconst user = await signIn({\n  serverClientId: 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com',\n  // Optional on iOS if plugin already set GIDClientID\n  iosClientId: 'YOUR_IOS_CLIENT_ID.apps.googleusercontent.com',\n\n  // Android options (ignored on iOS):\n  signInButtonFlow: false,\n  filterByAuthorizedAccounts: false,\n  preferImmediatelyAvailableCredentials: false,\n});\n\nconsole.log(user.idToken);\n\nawait signOut();\n```\n\n### Example env variables\n\n```env\nEXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID=YOUR_WEB_CLIENT_ID.apps.googleusercontent.com\nEXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID=YOUR_IOS_CLIENT_ID.apps.googleusercontent.com\n```\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n## API Reference\n\n### `signIn(options: GoogleSignInOptions): Promise<GoogleUser>`\n\n#### `GoogleSignInOptions`\n\n- `serverClientId: string` (required)\n  - Web OAuth client ID from Google Cloud.\n- `iosClientId?: string`\n  - iOS OAuth client ID. Optional if plugin sets `GIDClientID` in Info.plist.\n- `nonce?: string`\n  - Optional nonce.\n- `filterByAuthorizedAccounts?: boolean` (Android)\n- `preferImmediatelyAvailableCredentials?: boolean` (Android)\n- `signInButtonFlow?: boolean` (Android)\n\n#### Returns `GoogleUser`\n\n- `id: string`\n- `idToken: string`\n- `displayName?: string`\n- `givenName?: string`\n- `familyName?: string`\n- `profilePictureUrl?: string`\n- `phoneNumber?: string`\n\n### `signOut(): Promise<void>`\n\n- Android: clears credential manager state.\n- iOS: signs out current Google user.\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n## Troubleshooting\n\n### `serverClientId is required`\n\n- Ensure Web client ID is passed.\n- Ensure env is loaded correctly.\n\n### `Developer console is not set up correctly` / `DEVELOPER_ERROR`\n\n- Android package name mismatch.\n- SHA-1 missing or wrong.\n- Wrong client ID type used in `serverClientId`.\n\n### `iosClientId is required for iOS`\n\n- Add iOS client ID via plugin config or pass `iosClientId` in `signIn` options.\n\n### iOS build fails with Expo config/plugin errors\n\n- Use Node LTS (`20` or `22`), avoid Node `25`.\n- Reinstall pods and rebuild:\n\n```bash\ncd ios\npod install\n```\n\n### iOS build succeeds but sign-in fails\n\n- Verify bundle identifier exactly matches iOS OAuth client.\n- Verify OAuth consent screen test users.\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n## Contributing\n\nPRs and issues are welcome.\n\n1. Fork the project\n2. Create branch\n3. Commit changes\n4. Push branch\n5. Open PR\n\n## License\n\nMIT © Adem Hatay\n\n<!-- MARKDOWN LINKS & IMAGES -->\n[contributors-shield]: https://img.shields.io/github/contributors/ademhatay/expo-google-signin.svg?style=for-the-badge\n[contributors-url]: https://github.com/ademhatay/expo-google-signin/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/ademhatay/expo-google-signin.svg?style=for-the-badge\n[forks-url]: https://github.com/ademhatay/expo-google-signin/network/members\n[stars-shield]: https://img.shields.io/github/stars/ademhatay/expo-google-signin.svg?style=for-the-badge\n[stars-url]: https://github.com/ademhatay/expo-google-signin/stargazers\n[issues-shield]: https://img.shields.io/github/issues/ademhatay/expo-google-signin.svg?style=for-the-badge\n[issues-url]: https://github.com/ademhatay/expo-google-signin/issues\n[license-shield]: https://img.shields.io/github/license/ademhatay/expo-google-signin.svg?style=for-the-badge\n[license-url]: https://github.com/ademhatay/expo-google-signin/blob/main/LICENSE\n","readmeFilename":"README.md"}