-
Notifications
You must be signed in to change notification settings - Fork 18
feat: add OAuth URL generation tool #211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add create_oauth_url tool to generate OAuth authorization URLs - Creates short-lived SAPI tokens with component-specific access - Supports OAuth-requiring components (ex-google-analytics-v4, ex-gmail) - Returns OAuth URL string for external authorization flow - Add comprehensive tests with 100% pass rate - Update server tool registry and documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Fix code style violations (quotes, whitespace, line length) - Apply black formatting and isort - Fix parametrize format in tests - Add missing newlines at end of files - All tests still pass (6/6) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Development information is already available in README.md 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
@jordanrburger it is working in Cursor for me :) The only disadvantage is that the user has to manually let the LLM know that it is done. |
Replace raw HTTP calls with proper client method abstraction for token creation. Add token_create method to AsyncStorageClient with comprehensive test coverage. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Co-authored-by: Radoslav Klic <[email protected]>
Replace direct session state access with proper KeboolaClient pattern throughout the OAuth test file for consistency with project conventions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
oauth_url = ( | ||
f'https://external.keboola.com/oauth/index.html?token={sapi_token}' | ||
f'&sapiUrl={storage_api_url}#/{component_id}/{config_id}' | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the query part parameters should be properly encoded by using urllib.parse.urlencode function and the whole URL should be constructed using urllib.parse.urlunsplit function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will look into it and fix in follow-up PR. Thanks.
Replace manual string concatenation with urllib.parse functions for secure URL construction: - Use urlencode() for query parameters to prevent injection - Use urlunsplit() for proper URL assembly - Update tests to match encoded output Addresses: #211 (comment) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Summary
create_oauth_url
tool for OAuth-requiring component configurationskeboola.ex-google-analytics-v4
andkeboola.ex-gmail
Test plan
Integration Test Rationale
Integration tests were not added because:
external.keboola.com
)🤖 Generated with Claude Code