0.2.9 • Published 6 years ago
@martel/ctrlv v0.2.9
Ctrlv
A lightweight client for ctrlv.io; a simpler passwordless auth solution.
npm i @martel/ctrlvCreate a client instance
import { Auth } from "@martel/ctrlv"
const auth = new Auth("your-issuer-url", "your-app-id");Bind automatic auth handling
auth.restoreAuthState()Login user
auth.login()Logout user
Pass true to the function to logout the current user from all sessions to your application
auth.logout()Register for events
auth.on('change', ({ user, token }) => {})
auth.on('refresh', () => {})TODO
- More documentation of features
License
MIT.