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

@authorizerdev/authorizer-react

v2.2.0

Published

React SDK for [authorizer.dev](https://authorizer.dev). Adds authentication to your [React](https://reactjs.org/) application in minutes. Current version: **2.1.0**.

Downloads

1,208

Readme

authorizer-react

React SDK for authorizer.dev. Adds authentication to your React application in minutes. Current version: 2.1.0.

Code Sandbox Demo: https://codesandbox.io/s/authorizer-demo-qgjpw

Step 1 - Create an Authorizer instance

Deploy an Authorizer instance and grab the URL and client ID from the dashboard. See the deployment guide.

Step 2 - Install package

npm i --save @authorizerdev/authorizer-react
# or
yarn add @authorizerdev/authorizer-react

Step 3 - Import styles

// In your entry file (index.js, App.js, _app.js, etc.)
import '@authorizerdev/authorizer-react/styles.css';

Override the default theme using CSS variables:

:root {
  --authorizer-primary-color: #3b82f6;
  --authorizer-primary-disabled-color: #60a5fa;
  --authorizer-danger-color: #dc2626;
  --authorizer-success-color: #10b981;
  --authorizer-text-color: #374151;
  --authorizer-fonts-font-stack: -apple-system, system-ui, sans-serif;
  --authorizer-fonts-medium-text: 14px;
  --authorizer-radius-button: 5px;
  --authorizer-radius-input: 5px;
}

Step 4 - Configure provider and use components

import {
  AuthorizerProvider,
  Authorizer,
  useAuthorizer,
} from '@authorizerdev/authorizer-react';

const App = () => {
  return (
    <AuthorizerProvider
      config={{
        authorizerURL: 'http://localhost:8080',
        redirectURL: window.location.origin,
        clientID: 'YOUR_CLIENT_ID',
      }}
      // optional — 'graphql' (default) or 'rest'
      protocol="graphql"
    >
      <LoginSignup />
      <Profile />
    </AuthorizerProvider>
  );
};

const LoginSignup = () => {
  return <Authorizer />;
};

const Profile = () => {
  const { user } = useAuthorizer();
  if (user) {
    return <div>{user.email}</div>;
  }
  return null;
};

AuthorizerProvider props

| Prop | Type | Required | Description | | ---------------------- | --------------------------- | -------- | ------------------------------------------------ | | config | ConfigType | Yes | Authorizer connection config (see below) | | protocol | 'graphql' \| 'rest' | No | Transport protocol. Defaults to 'graphql' | | onStateChangeCallback | (state: AuthorizerState) => void | No | Called whenever auth state changes |

The protocol prop selects which transport the underlying authorizer-js SDK uses. Use 'rest' if your deployment restricts the GraphQL endpoint.

config fields

| Field | Type | Description | | --------------------------------------- | --------- | ------------------------------------------------------- | | authorizerURL | string | Base URL of your Authorizer instance | | redirectURL | string | URL to redirect to after login | | clientID | string | Client ID from the dashboard | | is_google_login_enabled | boolean | Google social login | | is_github_login_enabled | boolean | GitHub social login | | is_facebook_login_enabled | boolean | Facebook social login | | is_linkedin_login_enabled | boolean | LinkedIn social login | | is_apple_login_enabled | boolean | Apple social login | | is_twitter_login_enabled | boolean | Twitter/X social login | | is_microsoft_login_enabled | boolean | Microsoft social login | | is_twitch_login_enabled | boolean | Twitch social login | | is_discord_login_enabled | boolean | Discord social login | | is_roblox_login_enabled | boolean | Roblox social login | | is_basic_authentication_enabled | boolean | Email/password login | | is_magic_link_login_enabled | boolean | Magic link (passwordless) login | | is_sign_up_enabled | boolean | Allow new user registration | | is_strong_password_enabled | boolean | Enforce strong password policy | | is_multi_factor_auth_enabled | boolean | TOTP-based two-factor authentication | | is_mobile_basic_authentication_enabled| boolean | Mobile (phone number + password) authentication | | is_phone_verification_enabled | boolean | Phone number OTP verification |

These fields are populated automatically from the server's /api/meta response when AuthorizerProvider mounts.


Local Development

# Build in watch mode
npm start

# Run the example app in another terminal
cd example
npm i
npm start

# One-off build
npm run build

# Tests
npm test

# Storybook
npm run storybook
npm run build-storybook

# Bundle analysis
npm run size
npm run analyze

Release

  1. Bump the version in package.json.
  2. Tag the commit: git tag v<version>
  3. Push with tags: git push origin main --tags

The GitHub Actions release workflow handles npm publish and GitHub Release creation automatically.