Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Keep headless/API auth options when adding additional accounts#16

Open
spidey000 wants to merge 1 commit intoiam-brain:mainfrom
spidey000:fix/multi-auth-options
Open

Keep headless/API auth options when adding additional accounts#16
spidey000 wants to merge 1 commit intoiam-brain:mainfrom
spidey000:fix/multi-auth-options

Conversation

@spidey000
Copy link

Summary

Detected Problem

  • Adding a second+ OAuth account opened the browser flow immediately because authMethods collapsed to only browser OAuth once storage already contained entries, so headless/manual OAuth and API-key paths were unreachable.
  • The auth login workflow test reinforced that behavior by asserting only a single method was exposed when accounts existed, preventing the desired UX from being guarded.

Proposed Solution

  • Always offer the browser OAuth, headless/manual OAuth, and API-key login choices regardless of how many accounts are already stored.
  • Update the workflow test to check for all three labels so regressions are caught.

Implemented Solution

  • Removed the stored-account gate around the auth method list so [oauthMethod, manualOauthMethod, apiKeyMethod] is always returned.
  • Adjusted test/auth-login-workflow.test.ts to expect the three labels even when fixtures contain existing accounts.

Testing

  • npx vitest run test/auth-login-workflow.test.ts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant