@martel/ctrlv
v0.2.9
Published
A lightweight client for ctrlv.io; a simpler passwordless auth solution.
Downloads
3
Readme
Ctrlv
A lightweight client for ctrlv.io; a simpler passwordless auth solution.
npm i @martel/ctrlv
Create 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.