Package Exports
- @supabase/gotrue-js
- @supabase/gotrue-js/dist/main/index.js
- @supabase/gotrue-js/dist/module/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@supabase/gotrue-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gotrue-js
An isomorphic JavaScript client library for the GoTrue API.
Docs
- Using
gotrue-js
: https://supabase.com/docs/reference/javascript/auth-signup - TypeDoc: https://supabase.github.io/gotrue-js/v2
Quick start
Install
npm install --save @supabase/gotrue-js
Usage
import { GoTrueClient } from '@supabase/gotrue-js'
const GOTRUE_URL = 'http://localhost:9999'
const auth = new GoTrueClient({ 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-signout
Custom fetch
implementation
gotrue-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 { GoTrueClient } from '@supabase/gotrue-js'
const GOTRUE_URL = 'http://localhost:9999'
const auth = new GoTrueClient({ url: GOTRUE_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.