@martel/ctrlv

0.2.9 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @martel/ctrlv

Weekly Downloads

0

Version

0.2.9

License

MIT

Unpacked Size

22.5 kB

Total Files

6

Last publish

Collaborators

  • bmartel