Skip to content

An isomorphic Javascript library for Supabase Auth.

License

Notifications You must be signed in to change notification settings

supabase/auth-js

Folders and files

NameName
Last commit message
Last commit date
Jan 11, 2025
Dec 13, 2024
Feb 10, 2025
Feb 10, 2025
Feb 10, 2025
Apr 18, 2024
Oct 12, 2022
Sep 20, 2020
Aug 16, 2022
Jan 23, 2025
Sep 7, 2020
Dec 13, 2023
Nov 22, 2021
Nov 18, 2021
Jun 12, 2024
Dec 26, 2024
Jul 12, 2023
Jun 27, 2022

Repository files navigation

auth-js

An isomorphic JavaScript client library for the Supabase Auth API.

Docs

Quick start

Install

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 })

Custom fetch implementation

auth-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 })

Sponsors

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.

New Sponsor

Watch this repo