π¨ This repository has been moved and will be archived on October 10, 2025
All development has moved to the Supabase JS Monorepo
If you're looking for the README of
auth-js
, you can find it at:
https://github.com/supabase/supabase-js/tree/master/packages/core/auth-jsWhat happened?
This repository was merged into the main Supabase JS monorepo for better coordination, testing, and releases.
What you need to do:
- π For documentation: Visit the new auth-js location
- π For issues: Create them in the supabase-js repository
- π§ For contributions: See the Contributing Guide
- π For migration help: Read the Migration Guide
If you have open work:
- Uncommitted changes: Manually transport your work to the monorepo (file structure is the same under
packages/core/auth-js/
)- Open PRs: Tag a maintainer in your PR and we'll help you migrate it
- Issues: Will be transported to the supabase-js repository
β οΈ This is the old repository. Please use the supabase-js monorepo going forward.
auth-js
(DEPRECATED - USE MONOREPO)An isomorphic JavaScript client library for the Supabase Auth API.
auth-js
: https://supabase.com/docs/reference/javascript/auth-signupInstall
npm install --save @supabase/auth-js
Usage
import { AuthClient } from '@supabase/auth-js'
const GOTRUE_URL = 'http://localhost:9999'
const auth = new AuthClient({ url: GOTRUE_URL })
signUp()
: https://supabase.io/docs/reference/javascript/auth-signupsignIn()
: https://supabase.io/docs/reference/javascript/auth-signinsignOut()
: https://supabase.io/docs/reference/javascript/auth-signoutfetch
implementationauth-js
uses the cross-fetch
library to make HTTP requests, but an alternative fetch
implementation can be provided as an option. This is most useful in environments where cross-fetch
is not compatible, for instance Cloudflare Workers:
import { AuthClient } from '@supabase/auth-js'
const AUTH_URL = 'http://localhost:9999'
const auth = new AuthClient({ url: AUTH_URL, fetch: fetch })
We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products donβt exist we build them and open source them ourselves.
Generated using TypeDoc