Skip to content

feat(auth): allow configurable redirect URI in remote/manual OAuth flow#398

Merged
steipete merged 3 commits intoopenclaw:mainfrom
salmonumbrella:fix/issue-356-remote-redirect
Mar 8, 2026
Merged

feat(auth): allow configurable redirect URI in remote/manual OAuth flow#398
steipete merged 3 commits intoopenclaw:mainfrom
salmonumbrella:fix/issue-356-remote-redirect

Conversation

@salmonumbrella
Copy link
Copy Markdown
Contributor

@salmonumbrella salmonumbrella commented Mar 3, 2026

Summary

  • add --redirect-uri to gog auth add for manual/remote OAuth flows
  • thread redirect override through googleauth.AuthorizeOptions
  • use redirect override for remote step 1 URL generation and manual/code exchange when needed
  • preserve state validation behavior and add tests for override/reuse/precedence/invalid input

Testing

  • go test ./internal/googleauth ./internal/cmd
  • go test ./...

Closes #356

@steipete steipete force-pushed the fix/issue-356-remote-redirect branch from b79a23c to c88bbdb Compare March 8, 2026 00:59
@steipete steipete merged commit 70c751c into openclaw:main Mar 8, 2026
1 check passed
@steipete
Copy link
Copy Markdown
Collaborator

steipete commented Mar 8, 2026

Landed via temp rebase onto main.

  • Gate: go test ./internal/cmd ./internal/googleauth -run 'TestAuthAddCmd_RemoteStep1_|TestAuthAddCmd_RemoteStep2_PassesRedirectURI|TestManualAuthURL_|TestAuthorize_Manual_|TestNormalizeRedirectURI|TestAuthorize_InvalidRedirectURI' -count=1, make ci
  • Land commit: c88bbdb
  • Merge commit: 70c751c4001c0207adaf265b49a61ff65e9b2c4c

Fixups included:

  • preserve --redirect-uri in the remote step-2 replay guidance
  • changelog entry
  • extra regression coverage around override propagation and redirect/state behavior

Thanks @salmonumbrella!

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.

OAuth remote flow: allow configurable redirect/callback URL (not fixed localhost:1)

2 participants