Repository navigation
Expose verified account identity in sessions - #362
Conversation
|
The formatting and mutation checks now pass. The remaining failure is The same failure also occurs on upstream
This appears to be a timing race: without an interviewer, |
jserv
left a comment
There was a problem hiding this comment.
Rebase latest main branch which lands CI fixes.
3037a0d to
95cd325
Compare
ColtenOuO
left a comment
There was a problem hiding this comment.
The last two commits are follow-ups to review on the first one. Could you squash them into a single commit before merge?
e122aa3 to
5786643
Compare
|
Squashed into a single commit, 5786643. |
|
The browser lane failed in https://github.com/sysprog21/codetrial/actions/runs/39752627547/job/119738106918 |
No, it needs extra fixes. Wait for my PR. |
Peer interviews need to distinguish OAuth accounts from self-declared handles without treating email availability as proof of identity. Expose the distinction under the existing account ID invariant and guard against same-name account confusion and the zero ID boundary. Token admission and recording eligibility remain unchanged.
5786643 to
23b5704
Compare
ColtenOuO
left a comment
There was a problem hiding this comment.
LGTM. Let's wait for CI :)
|
Thank @yang94080-cloud for contributing! |
Signed-in session responses do not distinguish GitHub OAuth accounts from self-declared handles. This adds
identityVerifiedto/api/session, derived from the storedusers.github_id > 0, and documents the caller invariant that makes this distinction valid. Token admission and recording eligibility remain unchanged.Two regression tests cover self-declared sign-in and OAuth sign-in without email. Both failed on the missing field before the implementation and passed afterward. The OAuth test uses a stub whose email endpoint would return 403; recording is disabled, so that endpoint is not requested.
Validation: the two targeted tests passed, and
./scripts/test.shexited with code 0. The gate reported skipped browser checks due to unavailable Chromium, Java, or browser/server prerequisites, and skipped cargo-audit, actionlint, ruff, and shellcheck.This implements P1 of #306.
Refs #306
Closes #315
Summary by cubic
Signed-in session responses now include
identityVerified, letting clients distinguish GitHub OAuth accounts from self-declared handles. The flag is derived fromusers.github_id > 0, relying on the existing caller invariant that only the OAuth callback stores positive IDs. Token admission and recording eligibility are unchanged.Regression tests cover self-declared sign-in, OAuth sign-in without email, the zero GitHub ID boundary that guards against an accidental
>to>=change, and identity isolation when a typed handle matches an existing OAuth account's login. This implements P1 of #306 and closes #315.Written for commit 23b5704. Summary will update on new commits.