Feature Description
Add an optional auth method that allows users to log in by pasting a valid ChatGPT refresh token instead of completing the browser OAuth flow.
Use Case
This would help in cases where the normal browser login flow is inconvenient or unreliable, such as:
- remote SSH/devbox workflows
- headless environments like WSL or containers
- systems where the local callback server or browser handoff fails
- users who already have a valid refresh token and just need a bootstrap path
The plugin already supports refreshing credentials from a refresh token, but it cannot currently initialize auth from one directly.
Proposed Implementation
Add a new auth method that accepts a refresh token, calls the existing refresh-token exchange logic to obtain access, refresh, and expires, then stores the normal OAuth auth object and continues with the existing flow unchanged.
This would only use the refresh token against the OAuth token endpoint, not the Codex backend.
Compliance Consideration
Please confirm:
Alternatives Considered
The current workaround is using the browser OAuth flow, but that is less convenient in headless or remote setups.
Additional Context
If this approach sounds acceptable, I can implement it and open a PR.
Feature Description
Add an optional auth method that allows users to log in by pasting a valid ChatGPT refresh token instead of completing the browser OAuth flow.
Use Case
This would help in cases where the normal browser login flow is inconvenient or unreliable, such as:
The plugin already supports refreshing credentials from a refresh token, but it cannot currently initialize auth from one directly.
Proposed Implementation
Add a new auth method that accepts a refresh token, calls the existing refresh-token exchange logic to obtain
access,refresh, andexpires, then stores the normal OAuth auth object and continues with the existing flow unchanged.This would only use the refresh token against the OAuth token endpoint, not the Codex backend.
Compliance Consideration
Please confirm:
Alternatives Considered
The current workaround is using the browser OAuth flow, but that is less convenient in headless or remote setups.
Additional Context
If this approach sounds acceptable, I can implement it and open a PR.