KaisouMail uses same-origin /api callbacks for GitHub and LinuxDO login / registration. In production, configure OAuth callbacks on the control-plane domain, not the direct API domain.
Open /users?section=registration in the control plane and expand GitHub or LinuxDO to copy the callback for the current instance:
| Provider | Callback URL |
|---|---|
| GitHub | https://<control-plane-domain>/api/auth/github/callback |
| LinuxDO | https://<control-plane-domain>/api/auth/linuxdo/callback |
If one deployment has multiple control-plane aliases, each alias has its own same-origin callback. Register only the domain users should use, or add every live control-plane callback when multiple aliases must support login.
Configure the GitHub OAuth App with:
https://km.example.comhttps://km.example.com/api/auth/github/callbackThen save the GitHub client values in the control plane:
/users?section=registration -> GitHub -> Client ID/users?section=registration -> GitHub -> Client Secretread:user; extend it only when the deployment policy requires more profile dataWorker runtime variables remain available as fallback configuration:
GITHUB_CLIENT_IDGITHUB_CLIENT_SECRETGITHUB_OAUTH_SCOPESSettings saved in the control plane take precedence over runtime variables. Saved secrets are never echoed back.
Configure the LinuxDO OAuth Client with:
https://km.example.comhttps://km.example.com/api/auth/linuxdo/callbackThen save the LinuxDO client values in the control plane:
/users?section=registration -> LinuxDO -> Client ID/users?section=registration -> LinuxDO -> Client SecretThe system uses the default LinuxDO OAuth service URL, https://connect.linux.do. It is not editable in the control plane; deployers only need to override it through Worker runtime variables when targeting a compatible environment or if LinuxDO changes the OAuth issuer.
Worker runtime variables remain available as fallback configuration:
LINUXDO_CLIENT_IDLINUXDO_CLIENT_SECRETLINUXDO_OAUTH_BASE_URLThe KaisouMail Pages control plane forwards /api/* to the API Worker through a same-origin proxy. OAuth state, session cookies, and registration completion redirects all follow the same origin the user opened, so the callback should stay under the control-plane domain:
redirect_uri generated by /api/auth/{provider}/startKeep direct API domains for automation or compatibility clients, but do not use them as the default first-party browser OAuth callback.