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 🙏

© 2025 – Pkg Stats / Ryan Hefner

parakh-proxy

v1.0.5

Published

A minimal React Native package providing sign-in buttons for Google, Apple, and OTP authentication

Readme

Parakh Proxy

A minimal React Native package providing clean, attractive sign-in buttons for Google, Apple, and OTP authentication.

Installation

npm install parakh-proxy @react-native-google-signin/google-signin @invertase/react-native-apple-authentication

or

yarn add parakh-proxy @react-native-google-signin/google-signin @invertase/react-native-apple-authentication

Additional Setup

For Google Sign-In and Apple Sign-In to work, you'll need to follow the setup instructions for each library:

Usage

Basic Usage (Custom Handlers)

import React from 'react';
import { ParakhProxy } from 'parakh-proxy';

const App = () => {
  const handleGoogleSignIn = (user, error) => {
    if (error) {
      console.log('Google Sign In error:', error);
      return;
    }
    console.log('Google Sign In success:', user);
    // Implement your custom Google sign-in logic here
  };

  const handleAppleSignIn = (user, error) => {
    if (error) {
      console.log('Apple Sign In error:', error);
      return;
    }
    console.log('Apple Sign In success:', user);
    // Implement your custom Apple sign-in logic here
  };

  const handleOTPSignIn = () => {
    console.log('OTP Sign In pressed');
    // Implement your OTP sign-in logic here
  };

  return (
    <ParakhProxy
      onGoogleSignIn={handleGoogleSignIn}
      onAppleSignIn={handleAppleSignIn}
      onOTPSignIn={handleOTPSignIn}
    />
  );
};

export default App;

Built-in Authentication

import React from 'react';
import { ParakhProxy } from 'parakh-proxy';

const App = () => {
  const handleGoogleSignIn = (user, error) => {
    if (error) {
      console.log('Google Sign In error:', error);
      return;
    }
    console.log('Google user info:', user);
    // Handle successful Google sign-in
  };

  const handleAppleSignIn = (user, error) => {
    if (error) {
      console.log('Apple Sign In error:', error);
      return;
    }
    console.log('Apple user info:', user);
    // Handle successful Apple sign-in
  };

  const handleOTPSignIn = () => {
    console.log('OTP Sign In pressed');
    // Implement your OTP sign-in logic here
  };

  return (
    <ParakhProxy
      enableBuiltInSignIn={true}
      googleSignInConfig={{
        webClientId: 'your-google-web-client-id.googleusercontent.com',
        offlineAccess: true,
      }}
      onGoogleSignIn={handleGoogleSignIn}
      onAppleSignIn={handleAppleSignIn}
      onOTPSignIn={handleOTPSignIn}
    />
  );
};

export default App;

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | onGoogleSignIn | (user: User \| null, error?: string) => void | undefined | Callback function for Google sign-in result | | onAppleSignIn | (user: any \| null, error?: string) => void | undefined | Callback function for Apple sign-in result | | onOTPSignIn | () => void | undefined | Callback function for OTP sign-in button press | | containerStyle | ViewStyle | undefined | Custom style for the container | | buttonStyle | ViewStyle | undefined | Custom style for all buttons | | textStyle | TextStyle | undefined | Custom style for button text | | disabled | boolean | false | Disable all buttons | | enableBuiltInSignIn | boolean | false | Enable built-in authentication functionality | | googleSignInConfig | GoogleSignInConfig | undefined | Configuration for Google Sign-In (required if enableBuiltInSignIn is true) |

GoogleSignInConfig

| Property | Type | Required | Description | |----------|------|----------|-------------| | webClientId | string | Yes | Your Google Web Client ID | | offlineAccess | boolean | No | Request offline access | | hostedDomain | string | No | Restrict sign-in to a specific domain | | forceCodeForRefreshToken | boolean | No | Force code for refresh token |

Customization

You can customize the appearance of the buttons by passing custom styles:

<ParakhProxy
  onGoogleSignIn={handleGoogleSignIn}
  onAppleSignIn={handleAppleSignIn}
  onOTPSignIn={handleOTPSignIn}
  containerStyle={{ paddingHorizontal: 40 }}
  buttonStyle={{ borderRadius: 20, height: 55 }}
  textStyle={{ fontSize: 18, fontWeight: 'bold' }}
/>

Features

  • ✅ Minimal and clean UI design
  • ✅ Three pre-styled authentication buttons
  • ✅ Built-in Google Sign-In integration
  • ✅ Built-in Apple Sign-In integration (iOS only)
  • ✅ Custom authentication handler support
  • ✅ Fully customizable styling
  • ✅ TypeScript support
  • ✅ Cross-platform (iOS & Android)
  • ✅ Comprehensive error handling

Default Styling

The package comes with attractive default styling:

  • Google Button: Blue (#4285F4) with white text
  • Apple Button: Black (#000000) with white text
  • OTP Button: Green (#34C759) with white text

All buttons feature subtle shadows and smooth press animations for a polished user experience.

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.