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

@arte/ra-apisix-oidc

v2.0.0

Published

`@arte/ra-apisix-oidc` provides a React-Admin AuthProvider for authentication via APISIX OIDC endpoints.

Readme

@arte/ra-apisix-oidc

@arte/ra-apisix-oidc provides a React-Admin AuthProvider for authentication via APISIX OIDC endpoints.

This major version uses a session/cookie model: APISIX session state is authoritative, and this package no longer exports an HTTP client.

Example

import { Admin, ListGuesser, Resource, ShowGuesser } from "react-admin";
import { fetchUtils } from "ra-core";
import { apisixOidcAuthProvider } from "@arte/ra-apisix-oidc";
import simpleRestDataProvider from "ra-data-simple-rest";

const dataProvider = simpleRestDataProvider("http://localhost:9080/api");

const authProvider = apisixOidcAuthProvider();

export const App = () => (
  <Admin
    dataProvider={dataProvider}
    authProvider={authProvider}
    loginPage={false}
  >
    <Resource name="posts" list={ListGuesser} show={ShowGuesser} />
    <Resource name="users" list={ListGuesser} show={ShowGuesser} />
  </Admin>
);

apisixOidcAuthProvider(options)

You can customize the authentication provider with the following options:

  • loginURL (string, default: ${window.location.origin}/oidc/login): Login endpoint URL.
  • logoutURL (string, default: ${window.location.origin}/oidc/logout): Logout endpoint URL.
  • userInfoURL (string, default: ${window.location.origin}/oidc/me): User info endpoint URL.
  • storage (Storage, default: localStorage): Storage used only to keep previous location.

Example usage:

import { apisixOidcAuthProvider } from "@arte/ra-apisix-oidc";

const authProvider = apisixOidcAuthProvider({
  loginURL: "http://localhost:9080/oidc/login",
  logoutURL: "http://localhost:9080/oidc/logout",
  userInfoURL: "http://localhost:9080/oidc/me",
});

Migration notes (breaking major)

  • httpClient has been removed from package exports in favor of the default one.
  • Token-in-localStorage auth flow has been removed from apisixOidcAuthProvider.
  • handleCallback is now a no-op because APISIX handles OIDC session flow.

Configuration

APISIX and the upstream API should expose the following behavior:

/oidc/login

  • Purpose: Start OIDC login and redirect back to the admin app after successful authentication.
  • Behavior:
    • Unauthenticated users are sent through OIDC authentication.
    • Authenticated users are redirected to app root.

/oidc/me

  • Purpose: Return user information for the current authenticated APISIX session.
  • Behavior:
    • The apisix configuration should use the unauth_action to return a 401 status for unauthenticated requests to this endpoint.
    • Returns decoded user payload.
    • Returns 401 when unauthenticated.

/api

  • Purpose: The upstream API should accept authenticated requests based on the APISIX session cookie, without requiring a token in the request.
  • Behavior:
    • The apisix configuration should use the unauth_action to return a 401 status for unauthenticated requests to this endpoint.