bitlogin

0.0.8 • Public • Published

bitlogin

Serverless login with bitcoin

1. Login

a. Basic

Stores login info on localStorage

$bit("#login").login("moneybutton", (e) => {
  window.location.href = // redirect url
})

b. Advanced

You can also additionally store login info as cookie

$bit("#login").login("moneybutton", { cookie: true }, (e) => {
  window.location.href = // redirect url
})

2. Current User

let current_user = $bit.user()

3. Logout

Attach logout event handler to any element

$bit("#logout").logout((e) => {
  window.location.href = // redirect url
})

Readme

Keywords

none

Package Sidebar

Install

npm i bitlogin

Weekly Downloads

5

Version

0.0.8

License

ISC

Unpacked Size

3.72 kB

Total Files

5

Last publish

Collaborators

  • unwriter