Surface OAuth callback URL on the Settings page#30
Open
murbard wants to merge 1 commit into
Open
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>
Collaborator
Author
|
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". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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