Skip to content

[codex] fix auth preflight and otp state#4460

Draft
jp-agenta wants to merge 1 commit into
mainfrom
codex/fix-auth-preflight-and-otp-state
Draft

[codex] fix auth preflight and otp state#4460
jp-agenta wants to merge 1 commit into
mainfrom
codex/fix-auth-preflight-and-otp-state

Conversation

@jp-agenta
Copy link
Copy Markdown
Member

What changed

This fixes two auth-side issues: protected project queries now wait for a usable token, and the auth page resets an invalid OTP-visible state that could hide the email form.

It also adds a defensive fetchAllProjects() guard so project fetches return early when no token is available yet.

Why

On reload, the app could issue protected requests before SuperTokens had made an access token available, leading to unauthenticated /api/projects calls. Separately, the auth page could land in a state where OTP UI visibility hid the email entry form before an email had actually been submitted.

Impact

Protected project queries should no longer fire prematurely during auth refresh, and the auth page should no longer show a blank area under the social login divider.

Validation

  • pre-commit hooks
  • prettier
  • turbo lint
  • gitleaks
  • manual validation of auth reload and auth page rendering in local dev

@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment May 27, 2026 12:10pm

Request Review

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.

1 participant