Skip to content

feat(authorization): skip undefined/empty query parameter #4124

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

hassan254-prog
Copy link
Contributor

@hassan254-prog hassan254-prog commented May 28, 2025

Describe the problem and your solution

  • Some providers like Dropbox sign OAuth, do not allow empty query parameters, such as scope which we automatically inject.
  • This PR introduces a flag authorization_url_skip_undefined that can be set to true for providers where we want to omit these undefined parameters from the authorization URL.

This PR introduces a new boolean configuration flag, authorization_url_skip_empty, to provider definitions, enabling selective omission of query parameters with empty or undefined values from OAuth authorization URLs. The update addresses cases where some providers (e.g., Dropbox Sign) reject URLs containing such parameters (like scope) when they're empty, enhancing compatibility with strict provider requirements.

Key Changes:
• Added authorization_url_skip_empty?: boolean to provider type definitions (provider.ts)
• Extended provider JSON schema (schema.json) to include the new flag
• Updated OAuth controller logic (oauth.controller.ts) to remove empty string query parameters from the authorization URL when the flag is enabled

Affected Areas:
• OAuth controller logic
• Provider configuration schema validation
• Provider TypeScript interface definitions

This summary was automatically generated by @propel-code-bot

Copy link

linear bot commented May 28, 2025

@hassan254-prog hassan254-prog self-assigned this May 28, 2025
@hassan254-prog hassan254-prog force-pushed the kelvinwari/ext-714-nango-does-not-support-complete-removal-of-scope-params branch from fd2f182 to f97243c Compare May 28, 2025 07:22
@hassan254-prog hassan254-prog requested a review from a team May 28, 2025 07:40
Copy link
Collaborator

@bodinsamuel bodinsamuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any risk to always remove them?

@hassan254-prog
Copy link
Contributor Author

Is there any risk to always remove them?

I was thinking about that, but I’m concerned it might be a breaking change for some. What do you think, should we omit empty query params entirely for all?

@bodinsamuel
Copy link
Collaborator

I was thinking about that, but I’m concerned it might be a breaking change for some. What do you think, should we omit empty query params entirely for all?

I guess it could be 😞 lets go with that then 👍🏻

Copy link
Collaborator

@TBonnin TBonnin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we always skip the empty params? regarless of the provider and then avoid having to add yet another option to provider.yaml?

@bodinsamuel
Copy link
Collaborator

can we always skip the empty params? regarless of the provider and then avoid having to add yet another option to provider.yaml?

asked the same but in retrospect I'm sure some are relying on this unfortunately

@hassan254-prog hassan254-prog enabled auto-merge (squash) May 28, 2025 15:36
@hassan254-prog hassan254-prog merged commit 88550e5 into master May 28, 2025
17 checks passed
@hassan254-prog hassan254-prog deleted the kelvinwari/ext-714-nango-does-not-support-complete-removal-of-scope-params branch May 28, 2025 15:41
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.

3 participants