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