Surface OAuth callback URL on the Settings page - #30
Conversation
Operators hitting "Error 400: redirect_uri_mismatch" on Google's consent screen have no easy way to discover what URL Sieve actually sends as the OAuth redirect_uri. The Settings page lets them configure public_base_url but never tells them the resulting callback URL to register on the provider side. Compute and display the callback URL right under the public_base_url input. The displayed value is derived via the same s.publicBaseURL(r) helper that googleOAuthConfig.RedirectURL uses, so it's byte-for-byte what the OAuth flow will send. The block carries select-all styling so the operator can copy-paste it directly into Google Cloud Console (Authorized redirect URIs), a Slack App, or a GitHub App config. Same template change benefits Slack and GitHub OAuth flows that share the /oauth/callback path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Closing as already-shipped / obsolete. This change already landed on
The PR shows No action needed; the feature is live. Deleting the stale branch. |
Summary
Operators hitting Error 400: redirect_uri_mismatch on Google's OAuth consent screen had no easy way to discover what URL Sieve actually sends as the OAuth redirect_uri. The Settings page lets them configure
public_base_urlbut never tells them the resulting callback URL to register on the provider side.Computes and displays the full callback URL right under the public_base_url input, in a copy-pasteable code block (select-all styling). The value is derived via the same
s.publicBaseURL(r)helper thatgoogleOAuthConfig.RedirectURLuses, so what the operator sees is byte-for-byte the URL Sieve will send. A short note explains the mismatch error explicitly so the next operator who hits it knows where to look.Same callback URL applies to Slack and GitHub OAuth flows that share the
/oauth/callbackpath.Test plan
/settings→ the "OAuth callback URL Sieve will send" block appears under the public_base_url input, displaying${public_base_url}/oauth/callback.http://127.0.0.1:19816/oauth/callback(the loopback default).https://sieve.example.comand save → reload settings → block showshttps://sieve.example.com/oauth/callback.🤖 Generated with Claude Code