Skip to content

fix(auth): restore interactive login menu in TTY for v1.3.13#25

Closed
ramhaidar wants to merge 2 commits intoiam-brain:mainfrom
ramhaidar:fix/auth-login-menu-missing-v1.3.13
Closed

fix(auth): restore interactive login menu in TTY for v1.3.13#25
ramhaidar wants to merge 2 commits intoiam-brain:mainfrom
ramhaidar:fix/auth-login-menu-missing-v1.3.13

Conversation

@ramhaidar
Copy link
Copy Markdown
Contributor

Issue for this PR

Fixes #24

What does this PR do?

This fixes the v1.3.13 regression where the custom opencode-codex-auth menu was not shown in opencode auth login.

This PR also hardens lock handling by adding a fallback lock strategy when proper-lockfile import resolution is unavailable in some runtimes, preventing lock-related auth/cache failures.

How did you verify your code works?

  • Reproduced the issue on v1.3.13 where the login menu did not appear.
  • Confirmed the menu now appears in interactive opencode auth login.

- Use a bundled directory-based lock when proper-lockfile cannot be resolved so cache locking still works in packaged/runtime environments.
- Target: core
- Remove the inputs guard from the interactive browser auth path so TTY users can reach the account-adding menu even when no prompt data is passed.
- Target: auth
@adevwithpurpose
Copy link
Copy Markdown

Confirmed this fixes the issue for me on Windows. I tested it by building the branch locally and pointing opencode.json to file:///C:/Users/saf08/.opencode-auth-patched/dist. opencode auth login works again.

@ramhaidar
Copy link
Copy Markdown
Contributor Author

Confirmed this fixes the issue for me on Windows. I tested it by building the branch locally and pointing opencode.json to file:///C:/Users/saf08/.opencode-auth-patched/dist. opencode auth login works again.

Thank you for testing @adevwithpurpose 👍

Comment thread lib/cache-lock.ts
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you split the unrelated lockfile changes into a new PR?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The auth fix looks right, but can you please add a regression test for the actual failing path: TTY browser auth when authorize() is called with no inputs argument? Current tests only cover authorize({}), which is likely why this regression still exists. Ideally, add one focused unit test in codex-native-oauth-auth-methods.test.ts and, if you want to be extra safe, one wiring-level test that calls browserMethod.authorize() with no args.

@ramhaidar
Copy link
Copy Markdown
Contributor Author

@iam-brain thanks for fixing these, sorry i just read it after you closed the PR

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.

Authentication Login Menu does not appear on the latest OpenCode update (v1.3.13)

3 participants