Forgejo SSO with Authentik (OIDC)
Use Authentik as a Forgejo authentication source for web sign-in; Git credentials remain separate.
Last updated
On this page (5)
Forgejo · Authentik · OIDC
Before you start
- Forgejo administrator and Authentik administrator.
- Public HTTPS Forgejo URL.
Configure sign-in
- Create an Authentik application with a confidential OAuth2/OpenID provider and authorize the strict redirect https://<forgejo>/user/oauth2/authentik/callback.
- In Forgejo Site Administration, add an OAuth2 authentication source named authentik, select OpenID Connect, and enter the client credentials and Authentik application discovery URL ending in /.well-known/openid-configuration.
- Apply the intended access policy on the Authentik application before inviting users.
Verify the result
- An allowed user can sign in; a user denied by application policy cannot.
- Verify repository permissions separately from sign-in.
