@kozmodb/auth-js
TypeScript icon, indicating that this package has built-in type declarations

2.63.1 • Public • Published

auth-js

An isomorphic JavaScript client library for the Kozmodb Auth API.

Docs

Quick start

Install

npm install --save @kozmodb/auth-js

Usage

import { AuthClient } from '@kozmodb/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 '@kozmodb/auth-js'

const AUTH_URL = 'http://localhost:9999'

const auth = new AuthClient({ url: AUTH_URL, fetch: fetch })

/@kozmodb/auth-js/

    Package Sidebar

    Install

    npm i @kozmodb/auth-js

    Weekly Downloads

    0

    Version

    2.63.1

    License

    MIT

    Unpacked Size

    798 kB

    Total Files

    138

    Last publish

    Collaborators

    • mohamedbench