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 add @sometic/authnpm install @sometic/authyarn add @sometic/authbun add @sometic/auth@sometic/auth depends on @sometic/core only. No Firebase, Supabase, or OIDC SDK is pulled transitively.
Choose a provider
| Backend | Package | Extra peer (optional) |
|---|---|---|
| Own JSON REST API | @sometic/auth-local | none |
| Firebase Auth | @sometic/auth-firebase | firebase ^10 || ^11 || ^12 |
| Supabase Auth | @sometic/auth-supabase | @supabase/supabase-js ^2 |
| Generic IdP (Auth0, Keycloak, Cognito OIDC, …) | @sometic/auth-oidc | none (uses fetch + PKCE) |
| Unit / integration tests | built-in createTestAuthProvider | none |
Local REST
pnpm add @sometic/auth-localnpm install @sometic/auth-localyarn add @sometic/auth-localbun add @sometic/auth-localFirebase
pnpm add @sometic/auth-firebase firebasenpm install @sometic/auth-firebase firebaseyarn add @sometic/auth-firebase firebasebun add @sometic/auth-firebase firebaseSupabase
pnpm add @sometic/auth-supabase @supabase/supabase-jsnpm install @sometic/auth-supabase @supabase/supabase-jsyarn add @sometic/auth-supabase @supabase/supabase-jsbun add @sometic/auth-supabase @supabase/supabase-jsOIDC
pnpm add @sometic/auth-oidcnpm install @sometic/auth-oidcyarn add @sometic/auth-oidcbun add @sometic/auth-oidcFirebase 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 add @sometic/httpnpm install @sometic/httpyarn add @sometic/httpbun 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 add @sometic/reactnpm install @sometic/reactyarn add @sometic/reactbun add @sometic/reactpnpm add @sometic/vuenpm install @sometic/vueyarn add @sometic/vuebun add @sometic/vuepnpm add @sometic/elementsnpm install @sometic/elementsyarn add @sometic/elementsbun add @sometic/elementsReact and Vue expose auth on /auth subpaths.
Verify imports
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.