getAlby / lightning-browser-extension

The Bitcoin Lightning Browser extension that connects to different wallet interfaces and brings deep lightning integration to the web
https://getalby.com
MIT License
530 stars 193 forks source link

Does wallet support lnurl-auth? #435

Closed qqqzhch closed 2 years ago

qqqzhch commented 2 years ago

I am using some websites that support BTC lightning network login. Support lnurl Auth in Web API or in popup will be very convenient

bumi commented 2 years ago

yes, Alby supports lnurl-auth with most of the wallet connections. You can test that for example on lnmarkets.com or stacker.news

you should be able to initiate the login flow with something like:

function login(lnurl) {
  if (!window.webln) { return false; } // fallback to whatever you want to do, e.g. show a lnurl-auth QR code
  return window.webln.enable().then(() => {
    return window.webln.lnurl(lnurl);
  });
}
MoritzKa commented 2 years ago

@qqqzhch did it work out? Which websites do you use and/or which websites should use LNURL auth in your opinion?