Serverless login with bitcoin
Stores login info on localStorage
$bit("#login").login("moneybutton", (e) => {
window.location.href = // redirect url
})
You can also additionally store login info as cookie
$bit("#login").login("moneybutton", { cookie: true }, (e) => {
window.location.href = // redirect url
})
let current_user = $bit.user()
Attach logout event handler to any element
$bit("#logout").logout((e) => {
window.location.href = // redirect url
})