Setting Up OpenID Connect (OIDC) Authentication in Donetick
Donetick supports OpenID Connect (OIDC) authentication using the OAuth2 protocol. This allows users to log in with identity providers. such as Authentik.
Prerequisites
Before setting up OIDC authentication, ensure you have:
- An OIDC-compliant identity provider (Google, Azure AD, GitHub, Keycloak, etc.).
- OAuth2 credentials (Client ID and Client Secret).
- The necessary redirect URI configured in your identity provider.
If you use the Donetick mobile app with OIDC, add the mobile redirect URI in addition to the web redirect URI:
- Web:
https://your-donetick-instance.com/auth/oauth2 - Mobile:
donetick://auth/oauth2
OAuth2 Configuration
You can configure OIDC authentication via the config.yaml file or environment variables.
YAML Configuration (config.yaml)
oauth2:
client_id: "your-client-id"
client_secret: "your-client-secret"
redirect_url: "https://your-donetick-instance.com/auth/oauth2"
scopes:
- "openid"
- "profile"
- "email"
auth_url: "https://your-oidc-provider.com/auth"
token_url: "https://your-oidc-provider.com/token"
user_info_url: "https://your-oidc-provider.com/userinfo"
name: "Your Provider Name"
Example: Configure OIDC in Authentik
Below is a quick reference for setting up an OIDC provider in Authentik to work with Donetick.
1) Create the OAuth2/OIDC Provider
In Authentik:
- Go to Applications → Providers and create a new OAuth2/OpenID Provider.
- Set the Client ID and Client Secret (you will copy these into Donetick).
- Set Redirect URIs to include:
https://your-donetick-instance.com/auth/oauth2donetick://auth/oauth2(required for mobile sign-in)
- Set Scopes to include at least:
openid,profile,email.
2) Create an Application and Bind the Provider
- Go to Applications → Applications and create a new application.
- Select the provider you created above.
- Save the application and assign it to the users/groups that should be allowed to log in.
3) Map Authentik URLs to Donetick
In your Donetick config.yaml, set the following values using the Authentik provider endpoints:
auth_url: Authentik Authorization URLtoken_url: Authentik Token URLuser_info_url: Authentik Userinfo URL
Copy the Client ID and Client Secret from Authentik into the Donetick config.yaml.