Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Five commits on
mainsince PR #4 that were pushed directly without a PR — this surfaces them as a proper reviewable unit.fix: add OAUTH_REDIRECT_URI to OAuth client registration— registers an explicitredirect_urion the authlib Google client (env varOAUTH_REDIRECT_URI); Google now requires pre-registered redirect URIs for the OAuth flow to complete.fix: use google.auth.transport.requests.Request— replaces the deprecatedgoogle.auth.transport.urllib3.Requestwith the currentgoogle.auth.transport.requests.Requestin the OAuth callback token verification.fix: place middleware after app creation— movesSessionMiddlewareto afterapp = FastAPI(...)(was before, which is a no-op) and passes an explicitredirect_urito the OAuth client so Cloud Run (which terminates TLS and forwards as http) can construct the correcthttps://callback URL.debug: add logging to OAuth callback— addslogger.info/logger.errorin the callback handler for query params, session cookie presence, request headers, and the "no ID token" error path.fix: allow cross-origin session cookies (samesite=none, secure=true)— setssame_site="none"+https_only=TrueonSessionMiddlewareso the session cookie survives cross-origin requests between the Vercel frontend (*.vercel.app) and the Cloud Run backend (*.run.app). Without this the OAuth flow breaks on the deployed split.Test plan
src/web/auth.pyimports cleanly:python -c "from src.web import auth"src/web/app.pyimports cleanly:python -c "from src.web import app"google.auth.transport.requests.Request(not urllib3)SessionMiddlewareis added afterapp = FastAPI(...)(checksrc/web/app.pyline order)SessionMiddlewarehassame_site="none",https_only=TrueGOOGLE_OAUTH_CLIENTregistration includesredirect_uri=os.getenv("OAUTH_REDIRECT_URI", "")🤖 Generated with Claude Code