# @khulnasoft/auth-js

> Official client library for Khulnasoft Auth

Latest version **0.0.0** (published 2024-04-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @khulnasoft/auth-js
pnpm add @khulnasoft/auth-js
yarn add @khulnasoft/auth-js
bun add @khulnasoft/auth-js
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2024-04-19 |
| First published | 2024-04-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 153.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Khulnasoft |
| Maintainers | nextlinux |
| Keywords | auth, khulnasoft, auth, authentication |

## Links

- npm: https://www.npmjs.com/package/@khulnasoft/auth-js
- Repository: https://github.com/khulnasoft/auth-js
- Issues: https://github.com/khulnasoft/auth-js/issues
- npm.io page: https://npm.io/package/@khulnasoft/auth-js

## Dependencies (1)

- [@khulnasoft/node-fetch](https://npm.io/package/@khulnasoft/node-fetch.md) ^2.6.7

## Alternatives

- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads
- [escher-request](https://npm.io/package/escher-request.md) — 545 weekly downloads

## Recent versions

- 0.0.0 (latest) — 2024-04-19

## README

# `auth-js`

An isomorphic JavaScript client library for the [Khulnasoft Auth](https://github.com/khulnasoft/auth) API.

## Docs

- Using `auth-js`: https://khulnasoft.com/docs/reference/javascript/auth-signup
- TypeDoc: https://khulnasoft.github.io/auth-js/v2

## Quick start

Install

```bash
npm install --save @khulnasoft/auth-js
```

Usage

```js
import { AuthClient } from '@khulnasoft/auth-js'

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

const auth = new AuthClient({ url: GOTRUE_URL })
```

- `signUp()`: https://khulnasoft.io/docs/reference/javascript/auth-signup
- `signIn()`: https://khulnasoft.io/docs/reference/javascript/auth-signin
- `signOut()`: https://khulnasoft.io/docs/reference/javascript/auth-signout

### Custom `fetch` implementation

`auth-js` uses the [`cross-fetch`](https://www.npmjs.com/package/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:

```js
import { AuthClient } from '@khulnasoft/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](https://user-images.githubusercontent.com/10214025/90518111-e74bbb00-e198-11ea-8f88-c9e3c1aa4b5b.png)](https://github.com/sponsors/khulnasoft)

![Watch this repo](https://gitcdn.xyz/repo/khulnasoft/monorepo/master/web/static/watch-repo.gif 'Watch this repo')

---
_Source: https://npm.io/package/@khulnasoft/auth-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
