Cli oauth auth link#24
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances the go-zoom CLI and SDK to make OAuth authorization-code flows easier to test (including a manual paste-back option), allow more flexible callback server binding, and make several meeting/user request attributes optional for cleaner JSON payloads. It also adds operator-focused CLI documentation under skills/.
Changes:
- Added
--manualand--listen-addroptions toauth authorization-code, and updated the flow to print the real Zoom authorization URL. - Refactored OAuth client logic by extracting
AuthorizationURLandExchangeAuthorizationCode, adding explicit invalid-state handling and refresh token storage. - Made various meeting/user request attributes optional (pointers /
omitempty) and addedskills/zoom-cli-operator/SKILL.mdoperator documentation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/go-zoom/auth.go | Adds manual OAuth flow + configurable callback bind address; updates server flow and messaging. |
| zoom/client/client.go | Refactors OAuth into reusable methods; adds state validation error and refresh token persistence. |
| zoom/client/meeting.go | Makes meeting create/update attributes more optional via pointers/omitempty. |
| zoom/client/user.go | Makes Feature optional via pointer for cleaner request payloads. |
| zoom/models/meetings.go | Adds omitempty broadly and converts some nested settings fields to pointers. |
| skills/zoom-cli-operator/SKILL.md | Adds comprehensive CLI operator guidance and usage patterns. |
Comments suppressed due to low confidence (1)
cmd/go-zoom/auth.go:114
- If
--redirect-urihas no path (e.g.http://localhost:8080),callbackPathis set to/. The code then registers a callback handler on/and later also registers a separate root handler on/, which will panic due to duplicate ServeMux registrations. Consider requiring a non-empty redirect URI path (e.g./oauth/callback) or skipping the extra/handler whencallbackPath == "/".
callbackPath := redirectURL.Path
if callbackPath == "" {
callbackPath = "/"
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/Hawkeye-Claims/go-zoom/sessions/2552f763-0451-4cc4-93b1-9af12d5b6106 Co-authored-by: TheSlowpes <47455257+TheSlowpes@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the Zoom CLI's OAuth authorization code flow, enhances the flexibility of meeting and user attribute handling, and adds comprehensive operator documentation for the CLI. The main changes include a new manual OAuth flow for easier authentication testing, improved server binding for OAuth callbacks, refactoring of OAuth-related methods for clarity and reuse, and making several struct fields in the Zoom client optional to better support partial updates and cleaner JSON. Additionally, a detailed skill documentation file is added to guide users in operating the CLI.
OAuth Authorization Flow Improvements:
--manualflag to theauth authorization-codecommand, enabling a manual OAuth flow where users can paste back the callback URL or authorization code, making it easier to test with public redirect URIs or without a local callback server. [1] [2] [3]--listen-addrflag to allow the CLI's OAuth callback server to bind to a local address (e.g.,localhost:8080), supporting scenarios where the registered redirect URI is public (e.g., via ngrok) but the server should listen locally. [1] [2] [3]OAuth Method Refactoring and Robustness:
AuthorizationURLandExchangeAuthorizationCodemethods, improving code reuse and clarity. The callback handler now validates the OAuth state and handles errors more gracefully.Struct Field Flexibility:
MeetingAttributes,MeetingUpdateAttributes, andUserAttributespointers or optional (usingomitempty), allowing partial updates and cleaner JSON payloads in create/update operations. [1] [2] [3]Documentation and Usability:
SKILL.mdfor thezoom-cli-operatorskill, providing detailed instructions, usage patterns, and best practices for using the Zoom CLI, including authentication, command discovery, and safe operation guidelines.Most Important Changes:
OAuth Authorization Flow Enhancements:
--manualand--listen-addrflags to theauth authorization-codecommand, enabling manual OAuth flows and flexible callback server binding for easier authentication testing and compatibility with public redirect URIs. [1] [2] [3] [4]OAuth Client Refactoring and Robustness:
AuthorizationURLandExchangeAuthorizationCodemethods, improved state validation, and handled errors and refresh tokens more robustly.Struct Flexibility for API Operations:
MeetingAttributes,MeetingUpdateAttributes, andUserAttributesoptional (pointers oromitempty), supporting partial updates and cleaner JSON in create/update requests. [1] [2] [3]Documentation Improvements:
skills/zoom-cli-operator/SKILL.mdfile, documenting CLI usage, authentication flows, command discovery, and safe operation guidelines for users and developers.