authentik script

This commit is contained in:
Igor Loskutov
2025-12-05 13:57:33 -05:00
parent a4cd433daa
commit 8a1699ab5b

View File

@@ -82,6 +82,19 @@ docker compose -f docker-compose.prod.yml exec caddy caddy reload --config /etc/
### Step 4: Create OAuth2 Provider in Authentik ### Step 4: Create OAuth2 Provider in Authentik
**Option A: Automated Setup (Recommended)**
Run the setup script from the Reflector repository:
```bash
cd ~/reflector
./scripts/setup-authentik-oauth.sh https://authentik.example.com YourSecurePassword123 https://app.example.com
```
The script will output the configuration values to add to your `.env` files. Skip to Step 6.
**Option B: Manual Setup**
1. **Login to Authentik Admin** at `https://authentik.example.com/` 1. **Login to Authentik Admin** at `https://authentik.example.com/`
- Username: `akadmin` - Username: `akadmin`
- Password: The `AUTHENTIK_BOOTSTRAP_PASSWORD` you set in .env - Password: The `AUTHENTIK_BOOTSTRAP_PASSWORD` you set in .env
@@ -99,6 +112,11 @@ docker compose -f docker-compose.prod.yml exec caddy caddy reload --config /etc/
``` ```
https://app.example.com/api/auth/callback/authentik https://app.example.com/api/auth/callback/authentik
``` ```
- Scroll down to **Advanced protocol settings**
- In **Scopes**, add these three mappings:
- `authentik default OAuth Mapping: OpenID 'email'`
- `authentik default OAuth Mapping: OpenID 'openid'`
- `authentik default OAuth Mapping: OpenID 'profile'`
- Click **Finish** - Click **Finish**
3. **Create Application:** 3. **Create Application:**