2023-03-24 16:32:42 +00:00
|
|
|
# Local Auth
|
|
|
|
|
|
|
|
You must be logged in to test features like posting, replying, tipping, etc.
|
|
|
|
|
|
|
|
### Login with Email
|
|
|
|
|
|
|
|
- First, follow the local development instructions in the README.md
|
|
|
|
- Create a Sendgrid account (or other smtp service)
|
2023-03-24 16:36:25 +00:00
|
|
|
- Update your `.env` file and source it in `docker-compose.yml`
|
2023-03-24 16:32:42 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
LOGIN_EMAIL_SERVER=smtp://apikey:<sendgrid_api_key>@smtp.sendgrid.net:587
|
|
|
|
LOGIN_EMAIL_FROM=<sendgrid_email_from>
|
|
|
|
```
|
|
|
|
|
|
|
|
- Open http://localhost:3000
|
|
|
|
- Click "sign up" and enter your email address
|
|
|
|
- Check your email
|
|
|
|
- Click the link (looks like this):
|
|
|
|
|
|
|
|
```
|
|
|
|
http://localhost:3000/api/auth/callback/email?email=satoshi%40gmail.com&token=110e30a954ce7ca643379d90eb511640733de405f34a31b38eeda8e254d48cd7
|
|
|
|
```
|
|
|
|
|
|
|
|
### Login with Github
|
|
|
|
|
|
|
|
- [Create a new OAuth app](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app) in your Github account
|
|
|
|
- Set the callback URL to: `http://localhost:3000/api/auth/callback/github`
|
2023-03-24 16:36:25 +00:00
|
|
|
- Update your `.env` file
|
2023-03-24 16:32:42 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
GITHUB_ID=<Client ID>
|
|
|
|
GITHUB_SECRET=<Client secret>
|
|
|
|
```
|
|
|
|
- Signup and login as above
|
|
|
|
|
2023-05-14 21:13:20 +00:00
|
|
|
### Login with Lightning
|
|
|
|
|
|
|
|
- Use [ngrok](https://ngrok.com/) to create a HTTPS tunnel to localhost:3000
|
|
|
|
- Update `LNAUTH_URL` in `.env` with the URL provided by `ngrok` and add /api/lnauth to it
|