-
Notifications
You must be signed in to change notification settings - Fork 233
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
feat: Add oauth flow for querybook github integration #1497
Conversation
500a138
to
f0b1c90
Compare
f0b1c90
to
5a6db84
Compare
return github_manager.github_integration_callback() | ||
|
||
|
||
# Test GitHub OAuth Flow |
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.
let's not have the test code here. move to a separate test file
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.
will remove
def save_github_token(self, token: str) -> None: | ||
flask_session["github_access_token"] = token | ||
LOG.debug("Saved GitHub token to session") |
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.
will save to the user properties as well?
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.
Will handle refactoring to encrypt in db in later PR
@flask_app.route(GITHUB_OAUTH_CALLBACK) | ||
def github_callback() -> str: | ||
github_manager = get_github_manager() | ||
return github_manager.github_integration_callback() |
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.
would be better to just put this inside the datasources/github.py
together with other github routes?
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 we can leave here to keep OAuth flow logic together in GitHub manager, similar to gspread_exporter.py
window.receiveChildMessage = receiveMessage; | ||
|
||
// If the user closes the authentication window manually, clean up | ||
const timer = setInterval(() => { |
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.
why it needs a timer here?
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.
detects if the user manually closed the authentication window to throw an error authentication process incomplete
return config | ||
|
||
def save_github_token(self, token: str) -> None: | ||
flask_session["github_access_token"] = token |
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.
let's define a const for the key github_access_token
as it will be used by other module
0ac6e33
to
27dbd01
Compare
feat: Add serializing util for datadoc github
feat: Link Datadoc to GitHub Directory
* feat: Add oauth flow for querybook github integration * link datadoc to github directory * feat: Add Datadoc serializing util
OAuth flow for querybook github integration feature
Test Plan
Datadoc rightside bar:
Modal:
GitHub Oauth:
Post OAuth Flow (To be changed):