GitHub user OAuth credentials
Configure GitHub App user authorization and create one renewable Credential for each consenting user.
Use GitHub user OAuth when an agent must act as a specific person. This provider targets GitHub App user access tokens, not a legacy standalone OAuth App.
Before you begin
- Create or select the tenant-owned GitHub App.
- Enable expiring user access tokens and refresh tokens.
- Generate a Client Secret.
- Register
https://platform.constal.ai/v1/credential-authorizations/callbackas an exact callback URL. - Configure only the permissions required by user-attributed operations.
The OAuth flow requires the GitHub App Client ID, which is different from the App ID, and the Client Secret. The secret is used server-side for code exchange, refresh, and revocation.
GitHub references: Generating a user access token and User authorization callback URLs.
Set up the provider
- In Credentials → Providers, select Add provider.
- Choose GitHub user OAuth.
- Enter the GitHub App Client ID.
- Paste the GitHub App Client Secret.
- Copy the callback URL shown by Constal into the GitHub App settings.
- Select Set up provider.
One provider instance can create many user Credentials. Do not install a new provider for every user.
Authorize a user
- Select Create credential and choose the installed GitHub user OAuth provider.
- Name the Credential for the user or account.
- Select Continue to authorize.
- Review and approve the GitHub consent screen.
Constal stores the access token as Credential material and the refresh token as encrypted provider-private state. The consuming GitHub Driver never receives the refresh token.
Bind it
Use a principal-scoped Credential selector when the authenticated caller and GitHub grant belong to the same person:
key github-user + principal Alice → credential/github-alice
key github-user + principal Bob → credential/github-bobSigning in to invoke an agent is a separate AuthProvider decision. Create this outbound Credential only after explicit consent for the agent to act on GitHub.
Verify
Confirm status is active and call a read-only /user operation through the GitHub Resource. Check that the correct principal-scoped binding was pinned into the run.
Troubleshooting
- Incorrect client credentials: verify the Client ID and Client Secret belong to the same GitHub App.
- Redirect URI mismatch: register the exact shared callback without extra query parameters.
- No refresh token: enable expiring user access tokens in the GitHub App.
- Organization data unavailable: confirm App permissions, installation access, organization approval, and the user's own access.
Next steps
Read OAuth callback security, Scoped bindings, and Reconnect.