mdance / lnauth

Provides Drupal lnurl-auth functionality.
0 stars 0 forks source link

How does it work? #1

Open diskbuster opened 1 year ago

diskbuster commented 1 year ago

Module installed and enabled. Cant find anything about to login with lnauth and have no idea what to do get it to work.

It would be amazing to register and login thru getalby.com or other wallets, that use lnurl!

mdance commented 1 year ago

With the module enabled, when visiting /user/login you should see a login with lightning button added to the login form, clicking that button will open a modal with a qr code to allow an lnurl wallet like phoenix to authenticate by going receive > Use LNURL Link

You might need to add the following dependencies to your root composer.json, and the gmp php extension must be enabled:

    "ext-openssl": "*",
    "bacon/bacon-qr-code": "^2.0",
    "bitcoin-php/bitcoin-ecdsa": "master",
    "tkijewski/php-lnurl": "^0.0.1"

For the bitcoin-ecdsa library, I had to patch a few bugs in my fork repo:

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/mdance/BitcoinECDSA.php"
    },
mdance commented 1 year ago

I just tested the module with php 8.1 in my development environment and was able to get it to work still

diskbuster commented 1 year ago

thanks for the help. i added the dependencies and now it works. man, this is magic and with getalby.com it works flawless. :-)

it could be a good idea to disable user/edit page, because no email and password can be set after login - and it seems that will not be needed. will play around with profiles, to let the user optional set an email.