Skip to content

Classify reused CLI auth tokens#634

Merged
jahooma merged 1 commit intomainfrom
jahooma/classify-consumed-cli-auth-tokens
May 10, 2026
Merged

Classify reused CLI auth tokens#634
jahooma merged 1 commit intomainfrom
jahooma/classify-consumed-cli-auth-tokens

Conversation

@jahooma
Copy link
Copy Markdown
Contributor

@jahooma jahooma commented May 9, 2026

Summary

  • Replace destructive CLI auth token deletion with an atomic move from cli-login:<token> to cli-login-consumed:<token>.
  • Teach onboarding to distinguish reused opaque tokens from never-issued/missing tokens.
  • Show a specific already-used login-link message for duplicate/reopened browser requests instead of falling through to invalid auth code.
  • Add helper coverage for reused-token and missing-token classification.
  • Update auth docs to describe the consumed marker.

Validation

  • bun test web/src/app/onboard/__tests__/helpers.test.ts freebuff/web/src/app/onboard/__tests__/helpers.test.ts web/src/app/api/auth/cli/code/__tests__/origin.test.ts freebuff/web/src/app/api/auth/cli/code/__tests__/origin.test.ts
  • bunx prettier --check docs/authentication.md web/src/app/onboard/__tests__/helpers.test.ts web/src/app/onboard/_db.ts web/src/app/onboard/_helpers.ts web/src/app/onboard/page.tsx freebuff/web/src/app/onboard/__tests__/helpers.test.ts freebuff/web/src/app/onboard/_db.ts freebuff/web/src/app/onboard/_helpers.ts freebuff/web/src/app/onboard/page.tsx
  • bun run typecheck in web/
  • bun run typecheck in freebuff/web/
  • git diff --check

@jahooma jahooma force-pushed the jahooma/classify-consumed-cli-auth-tokens branch 2 times, most recently from 1435554 to e1d50b7 Compare May 10, 2026 00:50
@jahooma jahooma force-pushed the jahooma/classify-consumed-cli-auth-tokens branch from e1d50b7 to ab368ea Compare May 10, 2026 00:55
@jahooma jahooma merged commit 873c191 into main May 10, 2026
35 checks passed
@jahooma jahooma deleted the jahooma/classify-consumed-cli-auth-tokens branch May 10, 2026 01:00
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