Skip to content

Add validation for Claude Code OAuth token in onboarding#121

Open
mcintyre94 wants to merge 3 commits intomainfrom
add-validation-for-claude-code-entry-c14136af
Open

Add validation for Claude Code OAuth token in onboarding#121
mcintyre94 wants to merge 3 commits intomainfrom
add-validation-for-claude-code-entry-c14136af

Conversation

@mcintyre94
Copy link
Copy Markdown
Owner

Summary

  • Rejects tokens that don't have the sk-ant-oat01- prefix — only OAuth tokens are supported
  • "Save & Continue" button stays disabled until the token matches the expected format
  • Clear error message shown if saveClaudeToken is called with a wrong-prefix token
  • Adds unit tests covering valid token, empty token, wrong prefix, and whitespace handling

Test plan

  • Enter a non-OAuth token (e.g. sk-ant-api03-...) — button should remain disabled
  • Enter a valid sk-ant-oat01-... token — button should enable and continue to step 3
  • Verify error message appears if validation is bypassed with wrong prefix
  • Run unit tests: xcodebuild -scheme Wisp -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17' test

🤖 Generated with Claude Code

mcintyre94 and others added 3 commits April 4, 2026 07:19
Adds a ClaudeEffortLevel enum (low/medium/high/max) and surfaces it in
the existing model picker as a second Menu section. The pill label shows
the effort level only when non-default (e.g. "Sonnet · High") to avoid
visual noise. Max effort is hidden unless Opus is selected, and switching
away from Opus while on max resets to high. Effort is passed to every
claude invocation via --effort.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Reject tokens that don't have the sk-ant-oat01- prefix, since only
OAuth tokens are supported. The Save & Continue button stays disabled
until the token matches the expected format, and a clear error message
is shown if saveClaudeToken is called with a wrong-prefix token.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude bot commented Apr 8, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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