open-index/open-npm huggingface dataset:
npm package: @marketredesign/auth0-spa-vue
Description: Vue.js wrapper for auth0-spa-js
Author: Marijn van der Horst
Latest version: 1.2.1

# MRD Auth0 SPA Vue

Vue wrapper for [auth0-spa-js](https://github.com/auth0/auth0-spa-js).
As seen in Auth0's [Vue: Login Tutorial](https://auth0.com/docs/quickstart/spa/vuejs/).

## Usage
1. Make sure an application in the Auth0 dashboard has been created. 
2. Install this package, using `npm install @marketredesign/auth0-spa-vue`.
3. Import the `Auth0Plugin` Vue plugin, and optionally the `authGuard` into your application, using 
`import { Auth0Plugin, authGuard } from "@marketredesign/auth0-spa-vue";`
4. Register the plugin with Vue:
```javascript
Vue.use(Auth0Plugin, {
  domain: 'The Auth0 login domain',
  clientId: 'Auth0 client ID for this application',
  onRedirectCallback: appState => {
    router.push(
      appState && appState.targetUrl
        ? appState.targetUrl
        : 'default redirect'
    );
  }
});
```

### Log in to the App
Example template providing a login button:
```vue
<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png" />
    <HelloWorld msg="Welcome to Your Vue.js App" />

    <!-- Check that the SDK client is not currently loading before accessing is methods -->
    <div v-if="!$auth.state.loading">
      <!-- show login when not authenticated -->
      <button v-if="!$auth.state.isAuthenticated" @click="login">Login</button>
      <!-- show logout when authenticated -->
      <button v-if="$auth.state.isAuthenticated" @click="logout">Logout</button>
    </div>
  </div>
</template>
```

Define the login and logout functions for instance as follows.
```javascript
login() {
  this.$auth.loginWithRedirect();
}

logout() {
  this.$auth.logout({
    returnTo: window.location.origin
  });
}
```

### User profile information
Once the user authenticates, the SDK extracts the user's profile information and stores it in memory. 
It can be accessed using `this.$auth.state.user` from inside a Vue component.

### Protecting routes
Routes can be protected by specifying `beforeEnter: authGuard`.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. 
See deployment for notes on how to deploy the project to NPM.

### Prerequisites

* NodeJS >= 10

### Installing

1. Clone the repository
2. Execute `npm install`

## Deployment

1. Make sure you are logged into NPM using `npm adduser`
2. Verify the version is correct using `npm version`
3. Publish the package using `npm publish`

## Authors

* **Marijn van der Horst** - *Initial work*

See also the list of [contributors](https://github.com/marketredesign/your_project/contributors) who participated in this project.

## License

This project is licensed under the MRD License - see the [LICENSE](LICENSE) file for details
npm package: @markets-sh/supabase-minimal-js
Description: Inofficial Javascript client for Supabase with Auth and Postgrest only.
Author: Supabase
Latest version: 1.1.0

# `supabase-js`

An isomorphic JavaScript client for Supabase.

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

## Usage

First of all, you need to install the library:

```sh
npm install @supabase/supabase-js
```

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

```js
import { createClient } from '@supabase/supabase-minimal-js'

// Create a single supabase 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 supabase-js from CDNs, like:

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

or even:

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

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

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

  console.log('Supabase Instance: ', _supabase)
  // ...
</script>
```

### ESM

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

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

  console.log('Supabase Instance: ', supabase)
  // ...
</script>
```

### Custom `fetch` implementation

`supabase-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 { createClient } from '@supabase/supabase-minimal-js'

// Provide a custom `fetch` implementation as an option
const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key', {
  fetch: (...args) => fetch(...args),
})
```

## 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. Thanks to these sponsors who are making the OSS ecosystem better for everyone.

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