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

@kristalpithwa/react-native-linkedin-login

v0.0.4

Published

React Native LinkedIn login made easy with a ready-to-use WebView modal.

Readme

Enable LinkedIn authentication in your React Native application in minutes with a ready-to-use WebView solution designed for simplicity, reliability, and seamless user experience.

Installation

npm install @kristalpithwa/react-native-linkedin-login

or if you use yarn:

yarn add @kristalpithwa/react-native-linkedin-login

[!IMPORTANT] This library depends on react-native-webview. You must install it additionally.

npm install react-native-webview
or
yarn add react-native-webview

Getting LinkedIn API Keys

To use LinkedIn authentication, you must create a LinkedIn App and configure OAuth credentials.

Follow the steps below carefully.

Step 1: Navigate to LinkedIn Developers Portal

Open the LinkedIn Developers portal.

Sign in with your LinkedIn account.

Ensure your account has permission to create and manage applications.

Step 2: Create a New LinkedIn App

  1. Click on Create App.
  2. Fill in the required details:
    • App Name – Your application name
    • LinkedIn Page – Select an existing Company Page or create one
    • App Logo – Upload your app logo
    • Privacy Policy URL – Required and must be publicly accessible
  3. Accept LinkedIn’s terms and conditions.
  4. Click Create App.

✅ Your LinkedIn App has now been created successfully.

Step 3: Get Client ID and Client Secret

  1. Open your newly created app.
  2. Navigate to the Auth tab.
  3. Locate the following credentials:
    • Client ID
    • Client Secret
  4. Copy and store them securely.

[!CAUTION] Security Note

Never expose the Client Secret in mobile code.

Always store secrets in .env file.

Example:

LINKEDIN_CLIENT_ID=your_client_id
LINKEDIN_CLIENT_SECRET=your_client_secret

Step 4: Configure OAuth Redirect URI

  1. In the Auth tab, scroll to OAuth 2.0 settings.
  2. Add a Redirect URI, which LinkedIn will redirect users to after authentication.

Examples:

  • Web:

    https://yourdomain.com/auth/linkedin/callback
  • Local development:

    http://localhost:3000/auth/linkedin/callback
  • Mobile (backend-based auth):

    https://api.yourdomain.com/auth/linkedin/callback
  1. Click Save.

[!WARNING] The redirect URI must exactly match the one used in your authentication code.

Step 5: Enable “Sign In with LinkedIn using OpenID Connect”

  1. Go to the Products tab in your LinkedIn App dashboard.
  2. Find Sign In with LinkedIn using OpenID Connect.
  3. Click Add Product or Request Access.
  4. Approval is usually instant.

This enables access to:

  • Basic profile information
  • Email address (with proper scopes)

Step 6: Verify App Configuration

Before proceeding, ensure:

  • App status is Active
  • Client ID and Client Secret are available
  • Redirect URI is configured
  • OpenID Connect product is enabled

Your LinkedIn App is now ready for authentication.

Usage

import React, { useState } from 'react';
import { Button, StyleSheet, View } from 'react-native';
import { LoginWithLinkedIn } from '@kristalpithwa/react-native-linkedin-login';

export default function App() {
  const [isVisible, setIsVisible] = useState(false);

  return (
    <View style={styles.container}>
      <Button title="Login with LinkedIn" onPress={() => setIsVisible(true)} />

      <LoginWithLinkedIn
        isVisible={isVisible}
        clientId="YOUR_LINKEDIN_CLIENT_ID"
        clientSecret="YOUR_LINKEDIN_CLIENT_SECRET"
        redirectUri="YOUR_LINKEDIN_REDIRECT_URI"
        onSuccess={(data) => {
          console.log('Login Success:', data);
          setIsVisible(false);
          // data contains access_token, expiresIn, etc.
        }}
        onError={(error) => {
          console.log('Login Error:', error);
          setIsVisible(false);
        }}
        onClose={() => {
          setIsVisible(false);
          console.log('Modal Closed');
        }}
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
});

Props

| Prop | Type | Required | Description | | --------------- | --------------------------- | -------- | -------------------------------------------------------------------- | | isVisible | boolean | Yes | Controls the visibility of the login modal. | | clientId | string | Yes | Your LinkedIn Client ID. | | clientSecret | string | Yes | Your LinkedIn Client Secret. | | redirectUri | string | Yes | Your LinkedIn Redirect URI (must match LinkedIn App config). | | onSuccess | (data: any) => void | No | Callback fired on successful login. Returns the access token object. | | onError | (message: string) => void | No | Callback fired when login fails. | | onClose | () => void | Yes | Callback fired when the user closes the modal. | | animationType | 'slide' \| 'fade' | No | Animation type for the modal. Default is 'slide'. |

Hire an expert!

Maintained by a Senior React Native Developer (5+ years experience) 🌐 https://kristalpithwa.vercel.app

License

MIT