1.1.1 • Published 4 years ago

busie-auth-plugin v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

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: '', url: , onLoginSuccess: })

required

Provided to you by a busie-auth admin.

required

The appropriate url for your desired environment (staging, production, etc.)

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(, , , )

required

The #id of the element which is to have the auth flow mounted

required

See Above Usage for BusieAuthPlugin

required

See Above Usage for BusieAuthPlugin

required

See Above Usage for BusieAuthPlugin

login

Forwards a login request to the rootUrl's login endpoint asynchronous

import { login } from 'busie-auth' login(, { , }).then(/ Do something /)

required

See Above Usage for BusieAuthPlugin

required

The desired username to login with

required

The password to login with