Swizec/useAuth
The simplest way to add authentication to your React app. Supports various providers. observed · 2026-08-28
Health v2 · maintenance only
23/100
- Activity 0
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 2586
- days_rel: n/a
- days_push: 1330
- n_releases_24m: 0
Adoption not part of the score
2567 stars · 112 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
useAuth is a React hook library that adds authentication to React apps with minimal setup, supporting Auth0 and Netlify Identity via a provider abstraction and XState-based state management. It exposes a simple useAuth() API for login, signup, logout, session checks, and role/scope-based authorization.
Use cases
- add authentication to a React app
- add login and signup to a Gatsby site
- handle auth in a Next.js app
- use Auth0 with a React hook
- use Netlify Identity for zero-config login
- check user roles and scopes in React components
- manage auth state with a state machine
When to choose
- you use React with Gatsby, Next.js, or React Router and want quick Auth0 or Netlify Identity integration
- you want a minimal hook-based auth API with built-in role/scope checks
- you need SSR-safe authentication in a React app
When to avoid
- you use a provider other than Auth0 or Netlify Identity and don't want to write a custom provider wrapper
- you need server-side or cookie/session-based authentication out of the box
- you need a library with frequent updates and active maintenance
Facets
library · maturity maintenance
auth authorization middleware web-development frontend security developer-tools cross-platform react react-hooks auth0 netlify-identity gatsby nextjs xstate authentication typescript nodejs web-server
9 sources
- readme: https://github.com/Swizec/useAuth · fetched 2026-08-28 · 138d8d9b99d9
- homepage: https://useauth.dev · fetched 2026-08-29 · 2acf233dbecc
- site_page: https://useauth.dev/docs/getting-started · fetched 2026-08-29 · 39464c6c13b3
- site_page: https://useauth.dev/docs/upgrading · fetched 2026-08-29 · 02021174b978
- site_page: https://useauth.dev/docs/auth0 · fetched 2026-08-29 · 43d941a15bed
- site_page: https://useauth.dev/docs/netlify-identity · fetched 2026-08-29 · eca3fda9d561
- site_page: https://useauth.dev/docs/roles · fetched 2026-08-29 · 6aef0bd53af6
- site_page: https://useauth.dev/docs/auth-providers · fetched 2026-08-29 · 0b9f0687d86d
- site_page: https://useauth.dev/docs/api-reference · fetched 2026-08-29 · 76bb56786c76
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| Swizec/useAuth | main | 23 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem