Auth installation

Install the provider-independent core first. Add exactly one production provider package for your backend. Provider SDKs (Firebase, Supabase) are optional peers on those adapters, not dependencies of @sometic/auth.

Core

pnpm
pnpm add @sometic/auth
npm
npm install @sometic/auth
yarn
yarn add @sometic/auth
bun
bun add @sometic/auth

@sometic/auth depends on @sometic/core only. No Firebase, Supabase, or OIDC SDK is pulled transitively.

Choose a provider

BackendPackageExtra peer (optional)
Own JSON REST API@sometic/auth-localnone
Firebase Auth@sometic/auth-firebasefirebase ^10 || ^11 || ^12
Supabase Auth@sometic/auth-supabase@supabase/supabase-js ^2
Generic IdP (Auth0, Keycloak, Cognito OIDC, …)@sometic/auth-oidcnone (uses fetch + PKCE)
Unit / integration testsbuilt-in createTestAuthProvidernone

Local REST

pnpm
pnpm add @sometic/auth-local
npm
npm install @sometic/auth-local
yarn
yarn add @sometic/auth-local
bun
bun add @sometic/auth-local

Firebase

pnpm
pnpm add @sometic/auth-firebase firebase
npm
npm install @sometic/auth-firebase firebase
yarn
yarn add @sometic/auth-firebase firebase
bun
bun add @sometic/auth-firebase firebase

Supabase

pnpm
pnpm add @sometic/auth-supabase @supabase/supabase-js
npm
npm install @sometic/auth-supabase @supabase/supabase-js
yarn
yarn add @sometic/auth-supabase @supabase/supabase-js
bun
bun add @sometic/auth-supabase @supabase/supabase-js

OIDC

pnpm
pnpm add @sometic/auth-oidc
npm
npm install @sometic/auth-oidc
yarn
yarn add @sometic/auth-oidc
bun
bun add @sometic/auth-oidc

Firebase and Supabase peers are marked optional so the adapter packages can install without forcing every monorepo consumer to take the SDK. Your app must still install the peer when you use that adapter at runtime.

HTTP refresh (optional)

For Bearer attachment and 401 refresh/replay:

pnpm
pnpm add @sometic/http
npm
npm install @sometic/http
yarn
yarn add @sometic/http
bun
bun add @sometic/http

@sometic/auth is an optional peer of @sometic/http. Import @sometic/http/auth only when you wire createAuthInterceptor. See Interceptors and HTTP.

Framework adapters

Wave A surfaces:

pnpm
pnpm add @sometic/react
npm
npm install @sometic/react
yarn
yarn add @sometic/react
bun
bun add @sometic/react
pnpm
pnpm add @sometic/vue
npm
npm install @sometic/vue
yarn
yarn add @sometic/vue
bun
bun add @sometic/vue
pnpm
pnpm add @sometic/elements
npm
npm install @sometic/elements
yarn
yarn add @sometic/elements
bun
bun add @sometic/elements

React and Vue expose auth on /auth subpaths.

Verify imports

ts
import { createAuth, createTestAuthProvider } from "@sometic/auth";
import { createLocalAuthProvider } from "@sometic/auth-local";
import { createAuthInterceptor } from "@sometic/http/auth";

Tree-shake by importing only the subpaths you need (/storage, /authorization, /test-provider).

FAQ

Do I need cloud keys for local development?

No. Use createTestAuthProvider or mock Local / Firebase / Supabase / OIDC responses.

Can I install all providers?

Yes, but you only need one production provider per app. Installing unused adapters does not activate SDKs unless you import them and install their peers.

Why is firebase not a dependency of @sometic/auth?

Core must stay provider-independent. Locking Firebase into core would force every consumer to pay for a vendor they may never use.