stackernews / stacker.news

Internet communities that pay you Bitcoin
https://stacker.news
MIT License
419 stars 106 forks source link

Unable to login locally #70

Closed AustinKelsay closed 2 years ago

AustinKelsay commented 2 years ago

Despite editing .env.sample with both my Github and LND (using Polar) credentials it's still crashing every time I try to login locally and throwing this error: "Unhandled Runtime Error Error: Invalid URL: <YOUR PUBLIC TUNNEL TO LOCALHOST, e.g. NGROK>"

image
huumn commented 2 years ago

Which login method are you attempting to use?

AustinKelsay commented 2 years ago

I've tried GitHub, Twitter, and LND using Polar

huumn commented 2 years ago

Your error suggests it's attempting to use the variable LNAUTH_URL which should only happen if you're logging in via lightning. But maybe it's attempting to read it even when logging in by other means. Please try setting LNAUTH_URL in the .sample.env file to something like localhost and see if you can get further.

huumn commented 2 years ago

Also, you might need to restart your docker container after you edit the env file.

AustinKelsay commented 2 years ago

Great thanks this fixed it! I just went into my docker container for Polar and grabbed the url for the LND node I had setup in my local cluster and put it as the value for LNAUTH_URL in .env.sample

AustinKelsay commented 2 years ago

Hey sorry to open this up again but I'm still having issues logging in with lightning or any other method locally

Adding https://localhost:3000 to lnurl-auth in .env.sample gets my QR code to popup on the login page but it won't work with any of my wallets (despite me being able to login fine on the hosted site)

huumn commented 2 years ago
# lnurl-auth
LNAUTH_URL=<YOUR PUBLIC TUNNEL TO LOCALHOST, e.g. NGROK>

To login with lnauth locally you need a publicly accessible URL for your wallet to talk to. To make this work locally, you'll need to create an http tunnel from a public endpoint and update your env file with that endpoint. I used https://ngrok.com/ for this.