SSO / OAuth2¶
rpodder supports Single Sign-On via any OpenID Connect (OIDC) provider. Tested with Authentik, but should work with Keycloak, Dex, Google, Azure AD, and others.
How it works¶
- User clicks Sign in with {provider} on the login page
- rpodder redirects to the OIDC provider's authorization endpoint
- User authenticates with the provider
- Provider redirects back to rpodder with an authorization code
- rpodder exchanges the code for tokens, extracts user info
- rpodder creates a local user (if new) or logs in the existing one
- A session cookie is set and the user is redirected to the home page
Configuration¶
Set these environment variables:
RPODDER_OAUTH_ISSUER_URL=https://sso.example.com/application/o/rpodder/
RPODDER_OAUTH_CLIENT_ID=your-client-id
RPODDER_OAUTH_CLIENT_SECRET=your-client-secret
RPODDER_OAUTH_PROVIDER_NAME=Authentik
RPODDER_BASE_URL=https://podcast.example.com
The BASE_URL is critical — it's used to construct the OAuth callback URL: {BASE_URL}/auth/sso/callback.
Provider setup¶
Authentik¶
- In Authentik, create a new OAuth2/OpenID Provider
- Set the redirect URI to
https://podcast.example.com/auth/sso/callback - Scopes:
openid,profile,email,groups(if using admin group mapping) - Create an Application and link it to the provider
- Copy the Client ID, Client Secret, and Issuer URL
Keycloak¶
- Create a new Client in your realm
- Client Protocol:
openid-connect - Access Type:
confidential - Valid Redirect URIs:
https://podcast.example.com/auth/sso/callback - Copy the Client ID and Client Secret from the Credentials tab
Other providers¶
Any OIDC-compliant provider should work. rpodder uses the OIDC discovery endpoint ({issuer}/.well-known/openid-configuration) to find the authorization, token, and userinfo endpoints automatically.
Admin group mapping¶
If your OIDC provider sends group information in the groups claim (most do), you can automatically grant admin privileges:
When a user logs in via SSO:
- If they belong to the
adminsgroup → they become admin - If they don't (or were removed from the group) → admin role is revoked
- This check happens on every login, so group changes are reflected immediately
rpodder requests the groups scope when this setting is configured.
SSO users and passwords¶
SSO users are created with a random password hash (a UUID). They can:
- Log in via SSO only — they don't need a local password
- Set a local password — from the Settings page (
/settings), they can set a password without providing the "old password" (since they never had one). This enables them to also log in with username/password or use podcast clients that require HTTP Basic Auth - Have an admin set their password — via the admin panel
Best practice for podcast apps
If your users primarily authenticate via SSO but also need to use podcast apps (which require HTTP Basic Auth), have them set a local password from the Settings page after their first SSO login.
SSO info endpoint¶
The web UI checks /auth/sso/info to determine whether to show the SSO button: