Skip to content

fix(auth): validate status for external users - #531

Open
ddharman-quora wants to merge 2 commits into
mainfrom
codex/fix-auth-status-external-users
Open

fix(auth): validate status for external users#531
ddharman-quora wants to merge 2 commits into
mainfrom
codex/fix-auth-status-external-users

Conversation

@ddharman-quora

Copy link
Copy Markdown

Summary

  • validate poe-code auth status through GET /usage/current_balance instead of the employee-gated /v1/whoami endpoint
  • return only { "loggedIn": true } from successful auth status --json checks
  • remove the employee-only poe-code whoami and poe-code auth whoami CLI commands
  • update doctor to use the same external-user-compatible authentication check

Why

External users can complete login and receive a valid API key, but auth status currently reports HTTP 401 because /v1/whoami is restricted to employees.

Compatibility

This is a breaking CLI change: auth status --json no longer includes identity, and the two whoami commands are removed. The underlying SDK identity helper remains available.

Verification

  • full unit suite: 18,434 passed, 41 skipped
  • lint and typecheck passed
  • CLI help visually verified with npm run screenshot-poe-code -- auth --help

No release occurs unless this PR is merged to main.

Use the ungated current balance endpoint for auth status and doctor while leaving identity-based whoami behavior unchanged.

BREAKING CHANGE: auth status --json no longer returns identity details.
BREAKING CHANGE: poe-code whoami and poe-code auth whoami are no longer available.
@ddharman-quora
ddharman-quora requested a review from kamilio August 18, 2026 17:29
@ddharman-quora
ddharman-quora marked this pull request as ready for review August 18, 2026 17:29
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