samooth / bitlogin

Bitlogin: Login easily with Bitcoin Wallets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bitlogin

Serverless login with bitcoin

1. Login

a. Basic

Stores login info on localStorage

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

b. Advanced

You can also additionally store login info as cookie

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

2. Current User

let current_user = bitlogin.user()

3. Logout

Attach logout event handler to any element

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

About

Bitlogin: Login easily with Bitcoin Wallets


Languages

Language:JavaScript 62.1%Language:HTML 36.0%Language:CSS 1.9%