-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add connector config to oauth api #7678
Conversation
oauthOutput: | ||
type: object | ||
additionalProperties: true # Oauth parameters like refresh/access token etc.. will be different per API so we don't specify them in advance |
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 would expect this requires some small tweak to do in the front-end code to keep it compatible with the API change?
(the completeOauthResponse is now nested under oauthOutput
)
cc @jamakase
@@ -3296,9 +3302,24 @@ components: | |||
description: The query parameters present in the redirect URL after a user granted consent e.g auth code | |||
type: object | |||
additionalProperties: true # Oauth parameters like code, state, etc.. will be different per API so we don't specify them in advance | |||
CompleteOauthResponse: | |||
connectionConfiguration: |
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.
How come we are passing in connectionConfiguration
and not an oauth specific configuration like we discussed in the spec?
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.
if we pass the connectionConfiguration
(which includes the authConfiguraton
as a child node btw)
The backend can do the "seeding" to the connectionConfiguration and return the modified config back to the frontend.
We can also go read the "input" fields such as shop_id
directly in the connectionConfiguration.connectorSpecification
which would be a "partial" connectionConfig being entered in the UI by the user when the oauth flow is being triggered.
(Note the authConfiguraton could also be retrieved directly from the spec.json from a standardSourceConnectionDefinitionId too, so we wouldn't need to pass it in the API call either)
If the "seeding" is to be done in the UI instead, then I can rename this field to authConfiguration
yes
and that'd be extra work to do in the Front-end to handle the input/output from the authConfiguration
to merge back into connectionConfiguration
see the thread https://docs.google.com/document/d/1hjyu7hDqXPT1vUtofT7BzkZxDkD5ScpOI3xNAFVlcTs/edit?disco=AAAAQTBC0OQ
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.
The second option where the "seeding" is done by the UI would be from this other alternative PR: #7798 (then we can close and not merge this one)
9daeafd
to
977ca8f
Compare
What
New OAuth flows will need values from the connector config in #6971
How
Alteernative to #7798
This API changes adds an "optional" connector config parameter to the API endpoint:
Context