refactor(db-engine-specs): use standard OAuth 2.0 params in base class - #37010
Conversation
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
🎪 Showtime deployed environment on GHA for 2698a98 • Environment: http://35.90.48.240:8080 (admin/admin) |
Code Review Agent Run #2a8467Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
betodealmeida
left a comment
There was a problem hiding this comment.
Awesome, thanks for the fix!
apache#37010) (cherry picked from commit ea90d1f)
apache#37010) (cherry picked from commit ea90d1f)
SUMMARY
This PR refactors the OAuth 2.0 authorization flow to follow a cleaner architectural pattern.
Previously,
BaseEngineSpec.get_oauth2_authorization_uri()includedGoogle-specific OAuth parameters (prompt=consent, access_type=offline, include_granted_scopes=false`) directly in the base class. While this worked for Google Sheets, it's not the right design since these are provider-specific parameters rather than standard OAuth 2.0.The refactor moves to a cleaner separation of concerns:
Base class: Uses only standard OAuth 2.0 parameters (
scope, response_type, state, redirect_uri, client_id)Google Sheets: Overrides the method to add Google-specific parameters needed for proper token refresh
This makes the codebase more maintainable and allows future OAuth-enabled database connections to work without needing to handle Google-specific quirks.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION