Repository navigation
fix(auth): bind social login state to the issuing browser - #308
Merged
Merged
Conversation
voidvec
force-pushed
the
fix/social-login-state
branch
from
November 8, 2026 10:27
af5d6ae to
d0b79a0
Compare
voidvec
force-pushed
the
fix/social-login-state
branch
from
November 9, 2026 05:01
d0b79a0 to
d62e3bb
Compare
voidvec
marked this pull request as ready for review
November 9, 2026 07:37
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
wangrh0909
approved these changes
Nov 9, 2026
voidvec
force-pushed
the
fix/social-login-state
branch
from
November 9, 2026 08:07
b6ab7f0 to
591524c
Compare
Require an allowed Origin, binding cookie and one-time Redis transaction before GitHub, Google or WeChat code exchange. Keep login/link callback context, SDK contracts, startup wiring and credential-safe logging consistent. Validation: 609/609 CTest entries pass under PostgreSQL and memory configurations; WITH_SOCIAL=OFF builds and returns 404 for social starts/logins; frontend and three SDK checks pass.
…orced state binding #306 merged a documented limitation that social login lacked browser-bound state; this PR implements the protection, so both language mirrors now describe the enforced mechanism (204 cookie init, one-time 600 s state, Origin + cookie + body credentials, atomic consumption) and llms-full.txt is regenerated.
The gate on this PR never ran: the v1.29.1 release-asset download 504'd after 11 s with no retry. Retry transient gateway errors before failing.
…allback loginValidated() moves callback into callbackPtr on entry, but the not-configured branch still called respond(req, std::move(callback), ...) -- invoking an already-moved-from (empty) std::function. Pre-existing shape relocated verbatim from login() by this PR; Google/WeChat siblings check before the move. Review finding (minor, unreachable today: the guard 404s unconfigured providers first).
voidvec
force-pushed
the
fix/social-login-state
branch
from
November 9, 2026 08:28
591524c to
3666684
Compare
voidvec
added a commit
that referenced
this pull request
Nov 9, 2026
2026-11-09 retest: fine-grained PAT can merge PRs (#306/#319/#308 via pr merge --rebase); reading branch-protection rules is the new 403. Record the real merge blockers (draft flag, up-to-date requirement, author-cannot-self-approve, auto-merge disabled), prefer close->reopen over empty commits for CI retriggering (pull_request branch filter + non-default edited event gotcha), and mark Automatically-delete-head- branches as no longer effective (manual delete after merge).
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
Social login accepted provider codes without a browser-bound transaction. Require an allowed Origin, a binding cookie and one-time Redis state before any GitHub/Google/WeChat exchange or account write.
Breaking changes
Deploy the backend and user SPA together for the next MINOR. SDK callers must keep cookies, send Origin and submit body code/state; restart old in-flight flows. Disable social providers or roll forward if rollout fails. Stateless login is not a rollback option. No database migration, release or deployment is included.
Migration details: https://github.com/voidvec/fulla/blob/d0b79a0a0a1416459935c7b14abc0b734c76d819/docs/domains/social-login.md
Post-rebase validation
Rebased onto master 571dc29 (includes #306, #320; both api-baseline bumps converge on version 1.6.0). Follow-up commits: bilingual security-architecture now describes the enforced state binding (llms regenerated, mirror gate 50/50 local pass); oasdiff release-download retry (the prior 504 never ran the gate; the gate passes on the new head); GitHub fallback double-move fix (review finding). Preserve upstream consent synchronization, macOS 15, ccache, coverage hard gates and documentation changes. Merge both Unreleased changelog entries into one section. The zh-CN social guide retains upstream account/issuance/tier details and adds the complete bound-state protocol; provider instructions now explicitly require code/state, Origin and cookies. Regenerate LLM output with the current generator.
Historical full validation (before this rebase)
The following complete local runs validated the original implementation before master advanced; they are retained as provenance and are not post-rebase results:
Type of change
Checklist
CI observation after rebase: Security, Client SDKs and main CI Static Checks passed on the new head. OpenAPI Governance is blocked before its breaking gate: downloading the pinned oasdiff release returned HTTP 504 on both the original attempt and one targeted job retry (run 42471505005). The local pinned-v1.29.1 ERR gate against the new master passed. Other full CI jobs remain in progress; no completed remote validation is implied.