npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@agonzalezwww/react-native-social-login

v1.1.3

Published

A React Native package for social authentication with customizable buttons for multiple providers

Readme

React Native Social Login

A simple and flexible React Native package for Google and Apple authentication with customizable buttons.

Installation

npm install @agonzalezwww/react-native-social-login

Peer Dependencies:

npm install @react-native-google-signin/google-signin expo-apple-authentication

⚠️ Note: This package requires custom native code and cannot be used in Expo Go. Use development builds or bare React Native workflow.

Quick Start

import { AuthButton, GoogleLogin, AppleLogin } from '@agonzalezwww/react-native-social-login';

export default function LoginScreen() {
  const handleGoogleLogin = async () => {
    try {
      const user = await GoogleLogin.Login({
        iosClientId: 'your-ios-client-id',
        webClientId: 'your-web-client-id',
      });
      console.log('Google user:', user);
    } catch (error) {
      console.error('Google login failed:', error);
    }
  };

  const handleAppleLogin = async () => {
    try {
      const result = await AppleLogin.Login();
      console.log('Apple user:', result);
    } catch (error) {
      console.error('Apple login failed:', error);
    }
  };

  return (
    <>
      <AuthButton provider="google" onPress={handleGoogleLogin} />
      <AuthButton provider="apple" onPress={handleAppleLogin} />
    </>
  );
}

Components

AuthButton (Unified Component)

<AuthButton 
  provider="google" | "apple"
  onPress={() => Promise<void> | void}
  disabled={boolean}
  loading={boolean}
  buttonHeight={number}
  googleProps={Partial<GoogleAuthButtonProps>}
  appleProps={Partial<AppleAuthButtonProps>}
/>

Individual Components

import { GoogleAuthButton, AppleAuthButton } from '@agonzalezwww/react-native-social-login';

<GoogleAuthButton 
  onPress={handleLogin}
  mode="login" | "signup"
  buttonHeight={48}
  buttonStyle={ViewStyle}
  hideIcon={boolean}
/>

<AppleAuthButton 
  onPress={handleLogin}
  buttonText="signin" | "signup" | "continue"
  buttonStyle="white" | "white-outline" | "black"
  buttonHeight={48}
  cornerRadius={4}
/>

Services

Google Login

// Configure once, use multiple times
GoogleLogin.configure({
  iosClientId: 'your-ios-client-id',
  webClientId: 'your-web-client-id',
});

const user = await GoogleLogin.signIn();
const isSignedIn = await GoogleLogin.isSignedIn();
await GoogleLogin.signOut();

// Or configure and login in one step
const user = await GoogleLogin.Login({ iosClientId: '...', webClientId: '...' });

Apple Login

// Basic login
const result = await AppleLogin.Login();

// With custom scopes
const result = await AppleLogin.Login({
  requestedScopes: [AppleAuthenticationScope.EMAIL, AppleAuthenticationScope.FULL_NAME],
});

// Utilities
const isAvailable = await AppleLogin.isAvailable();
const isAuthenticated = await AppleLogin.isUserAuthenticated(userId);

Setup

Google Sign-In Setup

  1. Get credentials from Firebase Console or Google Cloud Console

    • Create iOS and Android OAuth clients with your bundle identifiers
    • Note your Web Client ID (use this in your code, not iOS Client ID)
  2. Configure your app based on your setup:

    Option A: Expo with Firebase Authentication

    Download google-services.json (Android) and GoogleService-Info.plist (iOS) from Firebase Console and place them in your project root:

    {
      "expo": {
        "plugins": ["@react-native-google-signin/google-signin"],
        "android": {
          "googleServicesFile": "./google-services.json"
        },
        "ios": {
          "googleServicesFile": "./GoogleService-Info.plist"
        }
      }
    }

    Option B: Expo without Firebase

    If you're not using Firebase, provide the iosUrlScheme option:

    {
      "expo": {
        "plugins": [
          [
            "@react-native-google-signin/google-signin",
            {
              "iosUrlScheme": "com.googleusercontent.apps.YOUR_IOS_CLIENT_ID"
            }
          ]
        ]
      }
    }

    Bare Workflow:

    cd ios && pod install
  3. Rebuild your app:

    npx expo prebuild --clean
    npx expo run:android && npx expo run:ios

    Note: This package cannot be used in Expo Go. Use development builds for testing.

Apple Sign-In Setup

  1. Enable "Sign In with Apple" in your Apple Developer Console App ID

  2. Configure your app:

    Expo/Managed Workflow:

    {
      "expo": {
        "ios": {
          "bundleIdentifier": "com.yourcompany.yourapp",
          "usesAppleSignIn": true
        },
        "plugins": ["expo-apple-authentication"]
      }
    }

    Bare Workflow:

    <!-- Info.plist -->
    <key>NSAppleAuthenticationEnabled</key>
    <true/>

TypeScript

Full TypeScript support included:

import type { 
  AppleAuthResult, 
  AppleAuthConfig,
  GoogleAuthButtonProps,
  AppleAuthButtonProps 
} from '@agonzalezwww/react-native-social-login';

Requirements

  • React Native: 0.70+
  • iOS: 13+ (for Apple Sign-In)
  • Android: API level 21+

License

MIT