mirror of https://github.com/wg-easy/wg-easy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.7 KiB
1.7 KiB
| title |
|---|
| External Authentication |
OAuth
Providers
To enable OAuth set the env var OAUTH_PROVIDERS to any of the following providers:
| Provider | Value |
|---|---|
google |
|
| GitHub | github |
You can enable multiple providers by separating them with a comma:
e.g. google,github
| Env | Required | Example | Description |
|---|---|---|---|
OAUTH_GOOGLE_CLIENT_ID |
✔️ | 123.apps.googleusercontent.com |
Google Client ID |
OAUTH_GOOGLE_CLIENT_SECRET |
✔️ | GOCSPX-xxx |
Google Client Secret |
OAUTH_GOOGLE_ALLOWED_DOMAIN |
✖️ | example.com |
Restrict login to a specific email domain |
Setup
- Go to Google Cloud Console
- Create an OAuth 2.0 Client ID (Web application)
- Add Authorized redirect URI:
https://<your-domain>/api/auth/google/callback - Copy the Client ID and Client Secret to the environment variables
GitHub
| Env | Required | Example | Description |
|---|---|---|---|
OAUTH_GITHUB_CLIENT_ID |
✔️ | xxx |
GitHub Client ID |
OAUTH_GITHUB_CLIENT_SECRET |
✔️ | xxx |
GitHub Client Secret |
Generic OIDC
TODO
Generic OAuth
TODO