Skip to content

Expose browser-bound OAuth verification outcomes without login - #140

Merged
dborovcanin merged 1 commit into
mainfrom
fix/oauth-verification-recovery-identity
Oct 29, 2026
Merged

dborovcanin merged 1 commit into
mainfrom
fix/oauth-verification-recovery-identity

Conversation

@arvindh123

Copy link
Copy Markdown
Contributor

Atom's OAuth callback currently reports an unverified account without a trusted identity that the relying application can use to distinguish registration from login. This causes Atomic login to offer email verification to people who never signed up for Builder (absmach/atomic#279).

For browser-bound flows, include an opaque single-use verification_code with the existing verification-required callback. POST /auth/oauth/verification redeems it for the provider-confirmed entity ID/email without issuing a session, verifying email or linking a provider. The callback URL contains neither email nor entity ID. Existing clients retain the original error outcome.

Recovery codes reuse the existing exchange-code store with a separate prefix and a purpose-bound secret hash: changing the prefix cannot turn recovery into login. Browser binding, expiry and atomic single-use checks apply to both purposes. No database migrations or new environment variables.

Validation:

  • 7 OAuth/recovery tests on SQLite, including verified primary email, normal login, recovery, replay, expiry and prefix substitution.
  • 2 database-backed login/recovery tests on PostgreSQL.
  • 25 HTTP/OpenAPI contract tests.
  • cargo clippy -- -D warnings, cargo fmt --check, API-contract hashes and database/storage boundary checks pass.

Deploy this companion change before Atomic's fix for absmach/atomic#279. Live provider logins and production deployment were not run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T13:59:01.034909Z bc6a2ee PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dborovcanin
dborovcanin merged commit 99672ec into main Oct 29, 2026
4 checks passed
@dborovcanin
dborovcanin deleted the fix/oauth-verification-recovery-identity branch October 29, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants