feat: configurable OAuth callback port for gws auth login#1
feat: configurable OAuth callback port for gws auth login#1
gws auth login#1Conversation
Agent-Logs-Url: https://github.com/ilteoood/gws-cli/sessions/a3a0d939-aa16-4501-995a-73774619e4e9 Co-authored-by: ilteoood <[email protected]>
gws auth login
Agent-Logs-Url: https://github.com/ilteoood/gws-cli/sessions/4f0920fe-4e99-4de9-90c1-1c0a65dc3ab5 Co-authored-by: ilteoood <[email protected]>
Applied the IPv6 fix from the Gemini review (commit |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
Let's change the whole implementation, remove the host definition and always use 0.0.0.0 Keep the port logic as is |
…ogic Agent-Logs-Url: https://github.com/ilteoood/gws-cli/sessions/603b728d-ac26-4682-ab45-3e6118d0aa91 Co-authored-by: ilteoood <[email protected]>
Done in |
gws auth logingws auth login
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
The OAuth loopback callback server always bound to
127.0.0.1on an OS-assigned random port withlocalhosthardcoded in the redirect URI — making it impossible to use a fixed port (required when the OAuth app has specific redirect URIs registered) or in Docker/CI environments where port-forwarding is used.Changes
gws auth login:--callback-port PORT— port to bind the callback server (default:0= OS-assigned)envfeature (CLI takes precedence):GOOGLE_WORKSPACE_CLI_CALLBACK_PORT0.0.0.0:{port}, supporting Docker/CI port-forwarding scenarioslocalhostas the hostnamelogin_with_proxy_support(yup-oauth2 doesn't expose port configuration)envfeature added to the dependencyExample
Original prompt