open-index/open-npm huggingface dataset:
npm package: @omneedia/auth-js
Description: Isomorphic Auth client
Author: Omneedia
Latest version: 1.0.0

# `gotrue-js`

An isomorphic JavaScript client library for the [GoTrue](https://github.com/supabase/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

```bash
npm install --save @supabase/gotrue-js
```

Usage

```js
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-signup
- `signIn()`: https://supabase.io/docs/reference/javascript/auth-signin
- `signOut()`: https://supabase.io/docs/reference/javascript/auth-signout

### Custom `fetch` implementation

`gotrue-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 { 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.

[![New Sponsor](https://user-images.githubusercontent.com/10214025/90518111-e74bbb00-e198-11ea-8f88-c9e3c1aa4b5b.png)](https://github.com/sponsors/supabase)

![Watch this repo](https://gitcdn.xyz/repo/supabase/monorepo/master/web/static/watch-repo.gif 'Watch this repo')
npm package: @omneedia/client-js
Description: Isomorphic Javascript client for Omneedia
Author: Omneedia
Latest version: 2.1.1

# `client-js`

An isomorphic JavaScript client for Omneedia.

- **Documentation:** https://omneedia.com/docs/reference
- TypeDoc: https://supabase.github.io/omneedia/client-js/

## Usage

First of all, you need to install the library:

```sh
npm install @omneedia/client-js
```

Then you're able to import the library and establish the connection with the database:

```js
import { createClient } from '@omneedia/client-js'

// Create a single omneedia client for interacting with your database
const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key')
```

### UMD

You can now use plain `<script>`s to import client-js from CDNs, like:

```html
<script src="https://cdn.jsdelivr.net/npm/@omneedia/client-js"></script>
```

or even:

```html
<script src="https://unpkg.com/@omneedia/client-js"></script>
```

Then you can use it from a global `omneedia` variable:

```html
<script>
  const { createClient } = omneedia
  const _omneedia = createClient('https://xyzcompany.supabase.co', 'public-anon-key')

  console.log('Omneedia Instance: ', _omneedia)
  // ...
</script>
```

### ESM

You can now use type="module" `<script>`s to import client-js from CDNs, like:

```html
<script type="module">
  import { createClient } from 'https://cdn.jsdelivr.net/npm/@omneedia/client-js/+esm'
  const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key')

  console.log('Omneedia Instance: ', omneedia)
  // ...
</script>
```