Skip to content

Commit 24ae17c

Browse files
committed
add auth section
1 parent 8d20f06 commit 24ae17c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/open-source-self-hosting.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,28 @@ By default, the images will point at the latest versioned release via the `v3` t
264264
TRIGGER_IMAGE_TAG=v3.0.4
265265
```
266266

267+
### Auth options
268+
269+
By default, magic link auth is the only login option. If the `RESEND_API_KEY` env var is not set, the magic links will be logged by the webapp container and not sent via email.
270+
271+
All email addresses can sign up and log in this way. If you would like to restrict this, you can use the `WHITELISTED_EMAILS` env var. For example:
272+
273+
```bash
274+
# every email that does not match this regex will be rejected
275+
WHITELISTED_EMAILS="authorized@yahoo\.com|authorized@gmail\.com"
276+
```
277+
278+
It's currently impossible to restrict GitHub OAuth logins by account name or email like above, so this method is _not recommended_ for self-hosted instances. It's also very easy to lock yourself out of your own instance.
279+
280+
<Warning>Only enable GitHub auth if you understand the risks! We strongly advise you against this.</Warning>
281+
282+
Your GitHub OAuth app needs a callback URL `https://<your_domain>/auth/github/callback` and you will have to set the following env vars:
283+
284+
```bash
285+
AUTH_GITHUB_CLIENT_ID=<your_client_id>
286+
AUTH_GITHUB_CLIENT_SECRET=<your_client_secret>
287+
```
288+
267289
### Checkpoint support
268290

269291
<Warning>

0 commit comments

Comments
 (0)