# busie-auth-plugin

> Front End Components for Busie Authentication

Latest version **1.1.1** (published 2020-08-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install busie-auth-plugin
pnpm add busie-auth-plugin
yarn add busie-auth-plugin
bun add busie-auth-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2020-08-25 |
| First published | 2020-08-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 86.3 KB |
| Known vulnerabilities | 0 (+26 in 2 direct dependencies) |
| Install scripts | no |
| Author | Brady Perry |
| Maintainers | bradyperry |
| Keywords | npm, vue, auth, busie |

## Links

- npm: https://www.npmjs.com/package/busie-auth-plugin
- npm.io page: https://npm.io/package/busie-auth-plugin

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [axios](https://npm.io/package/axios.md) ^0.19.2

## 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

- 1.1.1 (latest) — 2020-08-25
- 1.1.0 — 2020-08-25
- 1.0.0 — 2020-08-25

## README

# Busie Auth NPM Module
Offers a login method, the BusieAuthPlugin for Vue, and an embedLogin function
to embed login functionality directly into the dom.
## Installation
`npm install --save busie-auth`
## Usage
### BusieAuthPlugin
#### Vue plugin for Busie Auth. Exposes 'AuthLoginComponent' globally ***VUE REQUIRED***
  // Other imports (including Vue import) redacted for brevity
  import { BusieAuthPlugin } from 'busie-auth'
  Vue.use(BusieAuthPlugin, {
    token: '<BUSIE-AUTH-TOKEN>',
    url: <BUSIE-AUTH-URL>,
    onLoginSuccess: <CALLBACK>
  })

##### <BUSIE-AUTH-TOKEN> **required**
Provided to you by a busie-auth admin.

##### <BUSIE-AUTH-URL> **required**
The appropriate url for your desired environment (staging, production, etc.)

##### <CALLBACK> **required**
A callback to handle login success. should accept **LoginSuccess** event

##### LoginSuccess
A custom event who's handler is delegated to the **onLoginSuccess** callback

### embedLogin
#### Mounts the login flow on the desired element
  import { embedLogin } from 'busie-auth'
  embedLogin(<TARGET>, <BUSIE-AUTH-TOKEN>, <BUSIE-AUTH-URL>, <CALLBACK>)

##### <TARGET> **required**
The ***#id*** of the element which is to have the auth flow mounted

##### <BUSIE-AUTH-TOKEN> **required**
***See Above Usage for BusieAuthPlugin***

##### <BUSIE-AUTH-URL> **required**
***See Above Usage for BusieAuthPlugin***

##### <CALLBACK> **required**
***See Above Usage for BusieAuthPlugin***


### login
#### Forwards a login request to the rootUrl's login endpoint *asynchronous*
  import { login } from 'busie-auth'
  login(<BUSIE-AUTH-URL>, { <USERNAME>, <PASSWORD> }).then(/* Do something */)

##### <BUSIE-AUTH-URL> **required**
  ***See Above Usage for BusieAuthPlugin***

##### <USERNAME> **required**
The desired username to login with

##### <PASSWORD> **required**
The password to login with

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