Skip to content

OAuth Configuration

The generated setup file uses typed config and helper functions:

type oauthSetupConfig struct {
GoogleClientID string `keel:"oauth.google.client-id"`
GoogleClientSecret string `keel:"oauth.google.client-secret"`
GitHubClientID string `keel:"oauth.github.client-id"`
GitHubClientSecret string `keel:"oauth.github.client-secret"`
GitLabClientID string `keel:"oauth.gitlab.client-id"`
GitLabClientSecret string `keel:"oauth.gitlab.client-secret"`
RedirectBaseURL string `keel:"oauth.redirect-base-url,required"`
RoutePrefix string `keel:"oauth.route-prefix,required"`
EnabledProviders string `keel:"oauth.enabled-providers"`
RedirectOnSuccess string `keel:"oauth.redirect-on-success"`
RedirectTokenParam string `keel:"oauth.redirect-token-param,required"`
}
application.properties.envPurpose
oauth.google.client-idOAUTH_GOOGLE_CLIENT_IDGoogle client ID
oauth.google.client-secretOAUTH_GOOGLE_CLIENT_SECRETGoogle client secret
oauth.github.client-idOAUTH_GITHUB_CLIENT_IDGitHub client ID
oauth.github.client-secretOAUTH_GITHUB_CLIENT_SECRETGitHub client secret
oauth.gitlab.client-idOAUTH_GITLAB_CLIENT_IDGitLab app ID
oauth.gitlab.client-secretOAUTH_GITLAB_CLIENT_SECRETGitLab client secret
oauth.redirect-base-urlOAUTH_REDIRECT_BASE_URLBase URL used to build callback URLs
oauth.route-prefixOAUTH_ROUTE_PREFIXRoute prefix for generated handlers
oauth.enabled-providersOAUTH_ENABLED_PROVIDERSOptional provider allowlist
oauth.redirect-on-successOAUTH_REDIRECT_ON_SUCCESSOptional frontend redirect URL
oauth.redirect-token-paramOAUTH_REDIRECT_TOKEN_PARAMToken query parameter name
  • JSON mode returns { "token": "<jwt>" }.
  • Redirect mode appends the token to the configured frontend URL.

Set OAUTH_ENABLED_PROVIDERS=google,github when you want only a subset of configured providers exposed.