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.