0.0.1 • Published 1 year ago
@teegoh/auth-js v0.0.1
auth-js
An isomorphic JavaScript client library for the Teegoh Auth API.
Docs
- Using
auth-js: https://teegoh.com/docs/reference/javascript/auth-signup - TypeDoc: https://teegoh.github.io/auth-js/v2
Quick start
Install
npm install --save @teegoh/auth-jsUsage
import { AuthClient } from '@teegoh/auth-js'
const GOTRUE_URL = 'http://localhost:9999'
const auth = new AuthClient({ url: GOTRUE_URL })signUp(): https://teegoh.io/docs/reference/javascript/auth-signupsignIn(): https://teegoh.io/docs/reference/javascript/auth-signinsignOut(): https://teegoh.io/docs/reference/javascript/auth-signout
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 '@teegoh/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.

0.0.1
1 year ago
