{"_id":"@agonzalezwww/react-native-social-login","_rev":"5-02f8ad146f30840fa03794c0840d3b80","name":"@agonzalezwww/react-native-social-login","dist-tags":{"latest":"1.1.3"},"versions":{"1.0.0":{"name":"@agonzalezwww/react-native-social-login","version":"1.0.0","keywords":["react-native","social-login","google-signin","apple-signin","authentication","expo","typescript"],"author":{"name":"Andreu González","email":"andreugonzalezm@gmail.com"},"license":"MIT","_id":"@agonzalezwww/react-native-social-login@1.0.0","maintainers":[{"name":"agonzalezwww","email":"agonzalez@wwwarcelona.com"}],"homepage":"https://github.com/agonzalezwww/react-native-social-login#readme","bugs":{"url":"https://github.com/agonzalezwww/react-native-social-login/issues"},"dist":{"shasum":"eb173163d2c4d1e908463e332e32de1e28916cf8","tarball":"https://registry.npmjs.org/@agonzalezwww/react-native-social-login/-/react-native-social-login-1.0.0.tgz","fileCount":17,"integrity":"sha512-9siVobOYVoovAsEwPvOzAaoNytrW9BG7dqdNtSetCAUkyhtJtFct63766C9kzyYSjIqGamDsSWBqFwS+fAiOBw==","signatures":[{"sig":"MEQCIELyMJwPjG5AEOTPjr+oz4SrbK9EekAjnt0svIOy/yERAiBmbuxrJyW3FnYfQuMVis4NMAmT3cCPeVGfEBrFNHvo/g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":249458},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"8853d52b972e3d1cee436e28b458d695d6901ac0","scripts":{"build":"npx tsc","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"agonzalezwww","email":"agonzalez@wwwarcelona.com"},"repository":{"url":"git+https://github.com/agonzalezwww/react-native-social-login.git","type":"git"},"_npmVersion":"10.8.2","description":"A React Native package for social authentication with customizable buttons for multiple providers","directories":{},"_nodeVersion":"20.18.3","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/react":"^18.2.0","@types/react-native":"^0.72.8","expo-apple-authentication":"^6.4.2","@react-native-google-signin/google-signin":"^10.1.2"},"peerDependencies":{"react":">=18.0.0","react-native":">=0.70.0 <0.76.0","expo-apple-authentication":"^6.4.2","@react-native-google-signin/google-signin":"^10.1.2"},"_npmOperationalInternal":{"tmp":"tmp/react-native-social-login_1.0.0_1752831693350_0.8634720043132627","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@agonzalezwww/react-native-social-login","version":"1.1.0","keywords":["react-native","social-login","google-signin","apple-signin","authentication","expo","typescript"],"author":{"name":"Andreu González","email":"agonzalez@wwwarcelona.com"},"license":"MIT","_id":"@agonzalezwww/react-native-social-login@1.1.0","maintainers":[{"name":"agonzalezwww","email":"agonzalez@wwwarcelona.com"}],"homepage":"https://github.com/agonzalezwww/react-native-social-login#readme","bugs":{"url":"https://github.com/agonzalezwww/react-native-social-login/issues"},"dist":{"shasum":"214b09523597f8e7c491555225bcb0257d3b18e9","tarball":"https://registry.npmjs.org/@agonzalezwww/react-native-social-login/-/react-native-social-login-1.1.0.tgz","fileCount":17,"integrity":"sha512-En7c2hHyKdaE9vTnNpXCpiQy0FDZ9h4FKvJO0jH/XNGsT5O1fA1rmHJ/Hpngs6kix8QVFWBJdjE8XfHd7sFA5Q==","signatures":[{"sig":"MEQCIA+dULCt3YYqZrCZbhIBKYFdUwkAqKLZfuUsHDVwnCsuAiAhOgMBGrDHEdJxLJDtwUb688b0bZKNELZvdCLVZ+4UTw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":242106},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"7995995a05502354e7838e9fd798fc609f9d507c","scripts":{"build":"npx tsc","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"agonzalezwww","email":"agonzalez@wwwarcelona.com"},"repository":{"url":"git+https://github.com/agonzalezwww/react-native-social-login.git","type":"git"},"_npmVersion":"10.8.2","description":"A React Native package for social authentication with customizable buttons for multiple providers","directories":{},"_nodeVersion":"20.18.3","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/react":"^18.2.0","@types/react-native":"^0.72.8","expo-apple-authentication":"^6.4.2","@react-native-google-signin/google-signin":"^10.1.2"},"peerDependencies":{"react":">=18.0.0","react-native":">=0.70.0 <0.76.0","expo-apple-authentication":"^6.4.2","@react-native-google-signin/google-signin":"^10.1.2"},"_npmOperationalInternal":{"tmp":"tmp/react-native-social-login_1.1.0_1754472014206_0.7962919250725884","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@agonzalezwww/react-native-social-login","version":"1.1.1","keywords":["react-native","social-login","google-signin","apple-signin","authentication","expo","typescript"],"author":{"name":"Andreu González","email":"agonzalez@wwwarcelona.com"},"license":"MIT","_id":"@agonzalezwww/react-native-social-login@1.1.1","maintainers":[{"name":"agonzalezwww","email":"agonzalez@wwwarcelona.com"}],"homepage":"https://github.com/agonzalezwww/react-native-social-login#readme","bugs":{"url":"https://github.com/agonzalezwww/react-native-social-login/issues"},"dist":{"shasum":"7a59fb55d4fbb39a2728d661cdb2a62b595f5f15","tarball":"https://registry.npmjs.org/@agonzalezwww/react-native-social-login/-/react-native-social-login-1.1.1.tgz","fileCount":19,"integrity":"sha512-OL/DbTYm9TTM9cPPbL4duWIfmTwNbtJ1C9wy0JtDKk5FQh0POvyZA4AfaVgAru09AHTLXaGUz7/6pHgfPK6Uig==","signatures":[{"sig":"MEUCIQCCv31C5pVlP4PPpdeZXLLddYGl1sSL0YZE4vklaX2abQIgba7iZEDjc4R7Q+g7fwlVhUnEAVnhr1iHu3U79Qm5Fvc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":245032},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"9a60e47b802e3410e2943a46dc46efab26221f4f","scripts":{"build":"npx tsc","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"agonzalezwww","email":"agonzalez@wwwarcelona.com"},"repository":{"url":"git+https://github.com/agonzalezwww/react-native-social-login.git","type":"git"},"_npmVersion":"10.8.2","description":"A React Native package for social authentication with customizable buttons for multiple providers","directories":{},"_nodeVersion":"20.18.3","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/react":"^18.2.0","@types/react-native":"^0.72.8","expo-apple-authentication":"^6.4.2","@react-native-google-signin/google-signin":"^10.1.2"},"peerDependencies":{"react":">=18.0.0","react-native":">=0.70.0 <0.76.0","expo-apple-authentication":"^6.4.2","@react-native-google-signin/google-signin":"^10.1.2"},"_npmOperationalInternal":{"tmp":"tmp/react-native-social-login_1.1.1_1754479351560_0.566370953246718","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@agonzalezwww/react-native-social-login","version":"1.1.2","keywords":["react-native","social-login","google-signin","apple-signin","authentication","expo","typescript"],"author":{"name":"Andreu González","email":"agonzalez@wwwarcelona.com"},"license":"MIT","_id":"@agonzalezwww/react-native-social-login@1.1.2","maintainers":[{"name":"agonzalezwww","email":"agonzalez@wwwarcelona.com"}],"homepage":"https://github.com/agonzalezwww/react-native-social-login#readme","bugs":{"url":"https://github.com/agonzalezwww/react-native-social-login/issues"},"dist":{"shasum":"b909fd21863c19d2dcdd3cf911891010bde6cd68","tarball":"https://registry.npmjs.org/@agonzalezwww/react-native-social-login/-/react-native-social-login-1.1.2.tgz","fileCount":19,"integrity":"sha512-Ktk6RPnl4jwreT2cTXNdu0vvNMZuTPqBVgbdKzxyXz6SD15ZxrEGswrXMKQgVq+6nPdLpnHTRNOXoMcWfL+bpg==","signatures":[{"sig":"MEYCIQCBvFQ7i3KGm58UXXahz8LjMw8vbiGym7FbAo/apVenzQIhAMlipI4n3uiT9PMfHG20avV5biAUEExYAY8rbY0IGVci","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":245189},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"737d59da555eeca55b8c70be7e8d9827aaf36e66","scripts":{"build":"npx tsc","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"agonzalezwww","email":"agonzalez@wwwarcelona.com"},"repository":{"url":"git+https://github.com/agonzalezwww/react-native-social-login.git","type":"git"},"_npmVersion":"10.8.2","description":"A React Native package for social authentication with customizable buttons for multiple providers","directories":{},"_nodeVersion":"20.18.3","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/react":"^18.2.0","@types/react-native":"^0.72.8","expo-apple-authentication":"^6.4.2","@react-native-google-signin/google-signin":"^10.1.2"},"peerDependencies":{"react":">=18.0.0","react-native":">=0.70.0 <0.76.0","expo-apple-authentication":"^6.4.2","@react-native-google-signin/google-signin":"^10.1.2"},"_npmOperationalInternal":{"tmp":"tmp/react-native-social-login_1.1.2_1754491585786_0.140241277995375","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@agonzalezwww/react-native-social-login","version":"1.1.3","description":"A React Native package for social authentication with customizable buttons for multiple providers","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"npx tsc","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"keywords":["react-native","social-login","google-signin","apple-signin","authentication","expo","typescript"],"author":{"name":"Andreu González","email":"agonzalez@wwwarcelona.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/agonzalezwww/react-native-social-login.git"},"bugs":{"url":"https://github.com/agonzalezwww/react-native-social-login/issues"},"homepage":"https://github.com/agonzalezwww/react-native-social-login#readme","peerDependencies":{"@react-native-google-signin/google-signin":"^15.0.0","expo-apple-authentication":"^6.4.2","react":">=18.0.0","react-native":">=0.70.0 <0.76.0"},"devDependencies":{"@react-native-google-signin/google-signin":"^15.0.0","@types/react":"^18.2.0","@types/react-native":"^0.72.8","expo-apple-authentication":"^6.4.2","typescript":"^5.0.0"},"engines":{"node":">=16.0.0"},"_id":"@agonzalezwww/react-native-social-login@1.1.3","gitHead":"81249a23f40213d02b60c71542ca63465ba9d452","_nodeVersion":"20.18.3","_npmVersion":"10.8.2","dist":{"integrity":"sha512-ZX+mTTwf+sPSBRPjGytxv8KT0d/Latz578gM1D+Ub3SPv8LszDiXzoJ+OLfAT8dqx15IFRitf6zSu4IfXfaqEg==","shasum":"d8af718cd0a25feec4ebf97ae2be75181c765e5d","tarball":"https://registry.npmjs.org/@agonzalezwww/react-native-social-login/-/react-native-social-login-1.1.3.tgz","fileCount":19,"unpackedSize":245189,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCizRQAwKWVLdlNNwIUDxxZSijgXreyAYwlmYKmiELZdgIgI5Sje/MTOZN1SN+uSDOLEFffa2/tk+REZKD7ahTd/is="}]},"_npmUser":{"name":"agonzalezwww","email":"agonzalez@wwwarcelona.com"},"directories":{},"maintainers":[{"name":"agonzalezwww","email":"agonzalez@wwwarcelona.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-social-login_1.1.3_1763037544999_0.6656618849809712"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-18T09:41:33.184Z","modified":"2025-11-13T12:39:05.365Z","1.0.0":"2025-07-18T09:41:33.581Z","1.1.0":"2025-08-06T09:20:14.458Z","1.1.1":"2025-08-06T11:22:31.728Z","1.1.2":"2025-08-06T14:46:25.964Z","1.1.3":"2025-11-13T12:39:05.182Z"},"bugs":{"url":"https://github.com/agonzalezwww/react-native-social-login/issues"},"author":{"name":"Andreu González","email":"agonzalez@wwwarcelona.com"},"license":"MIT","homepage":"https://github.com/agonzalezwww/react-native-social-login#readme","keywords":["react-native","social-login","google-signin","apple-signin","authentication","expo","typescript"],"repository":{"type":"git","url":"git+https://github.com/agonzalezwww/react-native-social-login.git"},"description":"A React Native package for social authentication with customizable buttons for multiple providers","maintainers":[{"name":"agonzalezwww","email":"agonzalez@wwwarcelona.com"}],"readme":"# React Native Social Login\n\nA simple and flexible React Native package for Google and Apple authentication with customizable buttons.\n\n## Installation\n\n```bash\nnpm install @agonzalezwww/react-native-social-login\n```\n\n**Peer Dependencies:**\n```bash\nnpm install @react-native-google-signin/google-signin expo-apple-authentication\n```\n\n> **⚠️ Note:** This package requires custom native code and cannot be used in Expo Go. Use development builds or bare React Native workflow.\n\n## Quick Start\n\n```typescript\nimport { AuthButton, GoogleLogin, AppleLogin } from '@agonzalezwww/react-native-social-login';\n\nexport default function LoginScreen() {\n  const handleGoogleLogin = async () => {\n    try {\n      const user = await GoogleLogin.Login({\n        iosClientId: 'your-ios-client-id',\n        webClientId: 'your-web-client-id',\n      });\n      console.log('Google user:', user);\n    } catch (error) {\n      console.error('Google login failed:', error);\n    }\n  };\n\n  const handleAppleLogin = async () => {\n    try {\n      const result = await AppleLogin.Login();\n      console.log('Apple user:', result);\n    } catch (error) {\n      console.error('Apple login failed:', error);\n    }\n  };\n\n  return (\n    <>\n      <AuthButton provider=\"google\" onPress={handleGoogleLogin} />\n      <AuthButton provider=\"apple\" onPress={handleAppleLogin} />\n    </>\n  );\n}\n```\n\n## Components\n\n### AuthButton (Unified Component)\n\n```typescript\n<AuthButton \n  provider=\"google\" | \"apple\"\n  onPress={() => Promise<void> | void}\n  disabled={boolean}\n  loading={boolean}\n  buttonHeight={number}\n  googleProps={Partial<GoogleAuthButtonProps>}\n  appleProps={Partial<AppleAuthButtonProps>}\n/>\n```\n\n### Individual Components\n\n```typescript\nimport { GoogleAuthButton, AppleAuthButton } from '@agonzalezwww/react-native-social-login';\n\n<GoogleAuthButton \n  onPress={handleLogin}\n  mode=\"login\" | \"signup\"\n  buttonHeight={48}\n  buttonStyle={ViewStyle}\n  hideIcon={boolean}\n/>\n\n<AppleAuthButton \n  onPress={handleLogin}\n  buttonText=\"signin\" | \"signup\" | \"continue\"\n  buttonStyle=\"white\" | \"white-outline\" | \"black\"\n  buttonHeight={48}\n  cornerRadius={4}\n/>\n```\n\n## Services\n\n### Google Login\n\n```typescript\n// Configure once, use multiple times\nGoogleLogin.configure({\n  iosClientId: 'your-ios-client-id',\n  webClientId: 'your-web-client-id',\n});\n\nconst user = await GoogleLogin.signIn();\nconst isSignedIn = await GoogleLogin.isSignedIn();\nawait GoogleLogin.signOut();\n\n// Or configure and login in one step\nconst user = await GoogleLogin.Login({ iosClientId: '...', webClientId: '...' });\n```\n\n### Apple Login\n\n```typescript\n// Basic login\nconst result = await AppleLogin.Login();\n\n// With custom scopes\nconst result = await AppleLogin.Login({\n  requestedScopes: [AppleAuthenticationScope.EMAIL, AppleAuthenticationScope.FULL_NAME],\n});\n\n// Utilities\nconst isAvailable = await AppleLogin.isAvailable();\nconst isAuthenticated = await AppleLogin.isUserAuthenticated(userId);\n```\n\n## Setup\n\n### Google Sign-In Setup\n\n1. **Get credentials from [Firebase Console](https://console.firebase.google.com/) or [Google Cloud Console](https://console.cloud.google.com/)**\n   - Create iOS and Android OAuth clients with your bundle identifiers\n   - Note your **Web Client ID** (use this in your code, not iOS Client ID)\n\n2. **Configure your app based on your setup:**\n\n   **Option A: Expo with Firebase Authentication**\n   \n   Download `google-services.json` (Android) and `GoogleService-Info.plist` (iOS) from Firebase Console and place them in your project root:\n   \n   ```json\n   {\n     \"expo\": {\n       \"plugins\": [\"@react-native-google-signin/google-signin\"],\n       \"android\": {\n         \"googleServicesFile\": \"./google-services.json\"\n       },\n       \"ios\": {\n         \"googleServicesFile\": \"./GoogleService-Info.plist\"\n       }\n     }\n   }\n   ```\n\n   **Option B: Expo without Firebase**\n   \n   If you're not using Firebase, provide the `iosUrlScheme` option:\n   \n   ```json\n   {\n     \"expo\": {\n       \"plugins\": [\n         [\n           \"@react-native-google-signin/google-signin\",\n           {\n             \"iosUrlScheme\": \"com.googleusercontent.apps.YOUR_IOS_CLIENT_ID\"\n           }\n         ]\n       ]\n     }\n   }\n   ```\n\n   **Bare Workflow:**\n   ```bash\n   cd ios && pod install\n   ```\n\n3. **Rebuild your app:**\n   ```bash\n   npx expo prebuild --clean\n   npx expo run:android && npx expo run:ios\n   ```\n\n   > **Note**: This package cannot be used in Expo Go. Use development builds for testing.\n\n### Apple Sign-In Setup\n\n1. **Enable \"Sign In with Apple\" in your [Apple Developer Console](https://developer.apple.com/) App ID**\n\n2. **Configure your app:**\n\n   **Expo/Managed Workflow:**\n   ```json\n   {\n     \"expo\": {\n       \"ios\": {\n         \"bundleIdentifier\": \"com.yourcompany.yourapp\",\n         \"usesAppleSignIn\": true\n       },\n       \"plugins\": [\"expo-apple-authentication\"]\n     }\n   }\n   ```\n\n   **Bare Workflow:**\n   ```xml\n   <!-- Info.plist -->\n   <key>NSAppleAuthenticationEnabled</key>\n   <true/>\n   ```\n\n## TypeScript\n\nFull TypeScript support included:\n\n```typescript\nimport type { \n  AppleAuthResult, \n  AppleAuthConfig,\n  GoogleAuthButtonProps,\n  AppleAuthButtonProps \n} from '@agonzalezwww/react-native-social-login';\n```\n\n## Requirements\n\n- **React Native:** 0.70+\n- **iOS:** 13+ (for Apple Sign-In)\n- **Android:** API level 21+\n\n## License\n\nMIT","readmeFilename":"README.md"}