Skip to content
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

oauth: allow using templates in OAuth response template #1010

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

mdibaiee
Copy link
Member

@mdibaiee mdibaiee commented Apr 19, 2023

Description:

airbyte has recently introduced new fields to their OAuth response mappings, which need processing. In this case, we have AirTable which requires the expires_in field of response to be added to now() and rendered as an RFC3339 date to work. See here So I'm adding a condition here which allows response map to be rendered using a template instead of just jsonpointer.

In hindsight, we can probably just get rid of jsonpointers here and use mustache templates for the responseMap since it can do the same job anyway. For now I'm keeping both.

Workflow steps:

(How does one use this feature, and how has it changed)

Documentation links affected:

(list any documentation links that you created, or existing ones that you've identified as needing updates, along with a brief description)

Notes for reviewers:

(anything that might help someone review this PR)


This change is Reviewable

airbyte has recently introduced new fields to their OAuth response
mappings, which need processing. In this case, we have AirTable which
requires the `expires_in` field of response to be added to `now()` and
rendered as an RFC3339 date to work. So I'm adding a condition here
which allows response map to be rendered using a template instead of
just jsonpointer.

In hindsight, we can probably just get rid of jsonpointers here and use
mustache templates for the responseMap since it can do the same job
anyway. For now I'm keeping both.
@mdibaiee mdibaiee force-pushed the mahdi/template-response-map branch from 2ea0271 to 6f3a78f Compare April 19, 2023 16:29
@mdibaiee mdibaiee merged commit 8c3c7fc into mahdi/fix-code-verifier Apr 21, 2023
@mdibaiee mdibaiee deleted the mahdi/template-response-map branch April 21, 2023 14:22
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.

None yet

1 participant