Prerequisites
- An OpenID Connect provider that supports discovery (publishes
/.well-known/openid-configuration) - Admin access to create a client (application)
- external_url
Setup
1. Create a Client in Your Provider
The exact steps vary by provider. Create a confidential OAuth 2.0 / OpenID Connect client with these settings:- Grant type: Authorization Code
- Client authentication: enabled (client secret)
- Redirect URI:
- Scopes:
openid,email,profile
email claim. Make sure the client is allowed to release the user’s email.
2. Get Client Credentials
Copy the Client ID and Client Secret from the client you created.3. Get Issuer URL
The issuer URL is the base URL your provider publishes its discovery document under. pgconsole fetches<<issuer_url>>/.well-known/openid-configuration to find the authorization, token, and userinfo endpoints.
To verify, open the issuer URL with
/.well-known/openid-configuration appended in a browser. It should return a JSON document whose issuer field matches the URL you configured.
4. Configure pgconsole
Add the OIDC provider to yourpgconsole.toml:
pgconsole.toml
client_secret_basic) when your provider advertises it, and falls back to form-body credentials (client_secret_post) otherwise. If your client is registered for a specific method, set token_auth_method explicitly:
pgconsole.toml
oidc provider can be configured. To offer several identity providers side by side, combine oidc with the dedicated google, okta, or keycloak types.
5. Restart pgconsole
Restart the application for changes to take effect. A “Continue with Authentik” button (or “Continue with SSO” ifname is omitted) will appear on the login page.