Add native Pocket ID OIDC tutorials across the app guides
This commit is contained in:
@@ -106,7 +106,7 @@ Redeploy the stack by clicking "Deploy" and wait until SWAG is fully operational
|
||||
Inside the Swag folders, create the file `forgejo.subdomain.conf`.
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Tip:__ You can use [File Browser](/serveex/files/file-browser) to navigate and edit your files instead of using terminal commands.
|
||||
✨ __Tip:__ You can use [File Browser Quantum](/serveex/files/file-browser-quantum) to navigate and edit your files instead of using terminal commands.
|
||||
::
|
||||
|
||||
```bash [Terminal]
|
||||
@@ -192,6 +192,45 @@ Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ct
|
||||
|
||||
And that’s it! Forgejo is now exposed to the web.
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Tip:__ You can protect this app natively via OIDC with [Pocket ID](/serveex/security/pocket-id) (register it as an OIDC client), or with Authentik by [following these instructions](https://integrations.goauthentik.io/development/forgejo/).
|
||||
## Protecting Forgejo with Pocket ID
|
||||
Forgejo can also delegate login to an OIDC provider instead of (or alongside) its own accounts.
|
||||
|
||||
::steps{level="3"}
|
||||
### Register Forgejo as an OIDC client
|
||||
|
||||
[Register an OIDC client in Pocket ID](/serveex/security/pocket-id#registering-an-oidc-client) named `Forgejo`, with this callback URL:
|
||||
|
||||
```text
|
||||
https://forgejo.yourdomain.com/user/oauth2/PocketID/callback
|
||||
```
|
||||
|
||||
::note
|
||||
The `PocketID` in the callback URL must match the __Authentication Name__ you set in the next step, exactly.
|
||||
::
|
||||
|
||||
### Add the authentication source in Forgejo
|
||||
|
||||
As an admin, go to _Site Administration > Identity & Access > Authentication Sources_, click _Add Authentication Source_, and fill in:
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| Authentication Type | `OAuth2` |
|
||||
| Authentication Name | `PocketID` |
|
||||
| OAuth2 Provider | `OpenID Connect` |
|
||||
| Client ID (Key) | The client ID copied from Pocket ID |
|
||||
| Client Secret | The client secret copied from Pocket ID |
|
||||
| OIDC Discovery URL | Pocket ID's OIDC discovery URL |
|
||||
| Additional Scopes | `openid email profile` |
|
||||
|
||||
Also enable __Skip local 2FA__.
|
||||
|
||||
### Done !
|
||||
::
|
||||
|
||||
::tip
|
||||
✨ You can use [Authentik](/serveex/advanced/authentik) instead of Pocket ID:
|
||||
|
||||
1. In Authentik, create an application and an OAuth2/OpenID Connect provider named `Forgejo`, with a redirect URI (type `Strict`) of `https://forgejo.yourdomain.com/user/oauth2/authentik/callback`.
|
||||
2. Note the provider's __Client ID__, __Client Secret__, and __Slug__.
|
||||
3. In Forgejo's authentication source, set __Authentication Name__ to `authentik`, __OIDC Discovery URL__ to `https://authentik.yourdomain.com/application/o/<slug>/.well-known/openid-configuration`, then fill in the Client ID, Client Secret, and Additional Scopes `email profile`.
|
||||
::
|
||||
|
||||
Reference in New Issue
Block a user