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

@zezosoft/zezo-oauth-react-native

v1.0.4

Published

Zezo OAuth 2.0 / OpenID Connect SDK for React Native and Expo using Authorization Code + PKCE.

Readme

@zezosoft/zezo-oauth-react-native

Zezo OAuth 2.0 / OpenID Connect SDK for React Native and Expo.

Features

  • Authorization Code + PKCE (S256)
  • System browser authentication via expo-web-browser
  • Deep-link callback parsing (query string or hash)
  • Expo SecureStore token storage
  • Refresh token support
  • Logout / token revocation
  • UserInfo
  • TypeScript

Install

npx expo install expo-web-browser expo-secure-store
npm install @zezosoft/zezo-oauth-react-native

expo-auth-session is not required. This SDK opens the system browser with expo-web-browser and parses the redirect URL itself.

Mobile client

Create a separate public Zezo client for the mobile app.

Client: TIE Mobile
Client ID: <TIE_MOBILE_CLIENT_ID>
Client type: public
Redirect URI: tie://oauth/callback
Scopes: openid profile email
Issuer: https://api-v1.zezo.in

Never put a client secret in React Native.

Deep linking

Expo:

{
  "expo": {
    "scheme": "tie"
  }
}

Then use:

tie://oauth/callback

The exact redirect URI must be registered in Zezo.

Usage

import { ZezoAuth } from "@zezosoft/zezo-oauth-react-native";

const zezo = new ZezoAuth({
  clientId: process.env.EXPO_PUBLIC_ZEZO_CLIENT_ID!,
  redirectUri: "tie://oauth/callback",
  scopes: ["openid", "profile", "email"],
  storageKeyPrefix: "zezo_oauth",
});

scopes defaults to ["openid", "profile", "email"]. storageKeyPrefix defaults to "zezo_oauth" (tokens are stored as <prefix>_tokens in SecureStore).

Login

const result = await zezo.login();

console.log(result.accessToken);
console.log(result.refreshToken);
console.log(result.idToken);
console.log(result.user);

The SDK opens the system browser, so an existing Zezo browser session can be reused. After redirect, it validates state, exchanges the authorization code with the PKCE verifier, stores tokens in SecureStore, and attempts to load UserInfo.

Tokens

const tokens = await zezo.getTokens();
const accessToken = await zezo.getAccessToken();

User

const user = await zezo.getUserInfo();

Refresh

const tokens = await zezo.refreshToken();

Logout

await zezo.logout();

Logout revokes the access token when possible, then clears SecureStore.

Authentication state

const authenticated = await zezo.isAuthenticated();

This is true when tokens are present in SecureStore. It does not inspect expiry.

React Native example

import React from "react";
import { Button, View } from "react-native";
import { ZezoAuth } from "@zezosoft/zezo-oauth-react-native";

const zezo = new ZezoAuth({
  clientId: "YOUR_TIE_MOBILE_CLIENT_ID",
  redirectUri: "tie://oauth/callback",
  scopes: ["openid", "profile", "email"],
});

export default function LoginScreen() {
  const login = async () => {
    try {
      const result = await zezo.login();
      console.log("User:", result.user);
    } catch (error) {
      console.error(error);
    }
  };

  return (
    <View>
      <Button title="Continue with Zezo" onPress={login} />
    </View>
  );
}

OAuth flow

React Native
     |
     | Authorization Code + PKCE
     v
https://api-v1.zezo.in/oauth/authorize
     |
     | redirect with code
     v
tie://oauth/callback
     |
     | code + verifier
     v
https://api-v1.zezo.in/oauth/token

The mobile app never contains a client secret.

TIE recommendation

For TIE:

TIE Mobile
   |
   | Zezo OAuth + PKCE
   v
Zezo
   |
   | Zezo identity/token
   v
TIE Backend
   |
   | TIE JWT/session
   v
TIE Mobile

Keep any server-side client secret on the TIE backend only.

Runtime requirement

PKCE requires Web Crypto:

globalThis.crypto.getRandomValues;
globalThis.crypto.subtle.digest;

Use a current Expo / React Native runtime that provides Web Crypto.

Important security notes

  • Do not use a WebView for OAuth.
  • Do not ship clientSecret in the mobile app.
  • Do not store tokens in AsyncStorage.
  • Use an exact registered redirect URI.
  • Prefer short-lived access tokens and refresh-token rotation on the server.
  • Treat the Zezo access token as a Zezo credential; your TIE backend may issue a separate TIE JWT if that is your application architecture.

API

new ZezoAuth({
  clientId: string;
  redirectUri: string;
  scopes?: string[];
  storageKeyPrefix?: string;
})

login()
getTokens()
getAccessToken()
getUserInfo(accessToken?)
refreshToken()
logout()
isAuthenticated()

Also exported:

ZEZO_ISSUER;
AUTHORIZE_ENDPOINT;
TOKEN_ENDPOINT;
USERINFO_ENDPOINT;
REVOKE_ENDPOINT;

Issuer is fixed to https://api-v1.zezo.in and is not configurable.

License

MIT