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

@edge-base/auth-ui-react

v0.2.6

Published

EdgeBase Auth UI for React — pre-built authentication components

Downloads

1,256

Readme


@edge-base/auth-ui-react adds ready-to-use React auth components on top of @edge-base/web.

It is a good fit when you want:

  • a working sign-in and sign-up UI quickly
  • OAuth, magic link, OTP, and MFA flows without rebuilding every screen
  • a headless-first component set that still ships a default stylesheet
  • a simple auth context and useAuth() hook for the current user

This package is for React in browser-oriented apps. It is not the admin SDK, and it is not a React Native package.

EdgeBase is the open-source edge-native BaaS that runs on Edge, Docker, and Node.js.

This package is one part of the wider EdgeBase platform. For the full platform, CLI, Admin Dashboard, server runtime, docs, and all public SDKs, see the main repository: edge-base/edgebase.

Beta: the package is already usable, but some APIs and components may still evolve before general availability.

Documentation Map

For AI Coding Assistants

This package ships with an llms.txt file for AI-assisted React auth integration.

You can find it:

  • after install: node_modules/@edge-base/auth-ui-react/llms.txt
  • in the repository: llms.txt

Use it when you want an agent to:

  • wrap the app with AuthProvider correctly
  • pair this package with @edge-base/web instead of admin or ssr
  • choose between AuthForm, individual components, and useAuth()
  • avoid guessing config field names or default views

Installation

npm install @edge-base/web @edge-base/auth-ui-react

Make sure your app already has React and React DOM.

Quick Start

import { createClient } from '@edge-base/web';
import { AuthProvider, AuthForm } from '@edge-base/auth-ui-react';
import '@edge-base/auth-ui-react/styles.css';

const client = createClient('https://your-project.edgebase.fun');

export function LoginScreen() {
  return (
    <AuthProvider
      client={client}
      config={{
        providers: ['google', 'github'],
        magicLinkEnabled: true,
      }}
    >
      <AuthForm onSuccess={() => window.location.assign('/dashboard')} />
    </AuthProvider>
  );
}

Core Building Blocks

| Export | Use it for | | --- | --- | | AuthProvider | Provide the EdgeBase web client and shared UI config | | AuthForm | A full auth flow wrapper that switches between common views | | SignIn, SignUp | Individual credential screens | | SocialButtons | OAuth provider buttons | | MagicLink, EmailOTP, PhoneOTP | Alternative sign-in flows | | ForgotPassword, MFAChallenge | Recovery and multi-factor flows | | useAuth() | Read the current user, loading state, and sign out | | useAuthContext() | Access the raw provider context when building custom UI |

Auth Context

If you want your own UI while still using the provided auth state hook:

import { useAuth } from '@edge-base/auth-ui-react';

function HeaderActions() {
  const { user, loading, signOut } = useAuth();

  if (loading) return <span>Loading...</span>;
  if (!user) return <a href="/login">Sign in</a>;

  return (
    <button onClick={() => void signOut()}>
      Sign out {user.displayName ?? user.email}
    </button>
  );
}

Configuration

AuthProvider accepts a config object for common flow choices:

  • providers
  • defaultView
  • showForgotPassword
  • showToggle
  • oauthRedirectUrl
  • magicLinkEnabled
  • emailOtpEnabled
  • phoneOtpEnabled
  • classPrefix
  • localization

The default classPrefix is eb-auth.

Styling

You have two good options:

  1. import the default stylesheet:
import '@edge-base/auth-ui-react/styles.css';
  1. keep the components headless-first and target the generated CSS classes using your own design system

The generated classes use the configured prefix, so the default form class names look like eb-auth-form, eb-auth-button, and eb-auth-error.

Choose The Right Package

| Package | Use it for | | --- | --- | | @edge-base/web | The underlying browser SDK and auth client | | @edge-base/auth-ui-react | Pre-built React auth components on top of the web SDK | | @edge-base/ssr | Cookie-based server-side auth handling | | @edge-base/admin | Trusted server-side admin tasks |

License

MIT