feat(integrations): add support for bing-webmasters#5817
feat(integrations): add support for bing-webmasters#5817hassan254-prog merged 3 commits intoNangoHQ:masterfrom
Conversation
fe4f80e to
9b8db74
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe4f80e188
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| auth_mode: OAUTH2 | ||
| authorization_url: https://www.bing.com/webmasters/oauth/authorize | ||
| token_url: https://www.bing.com/webmasters/oauth/token | ||
| refresh_url: https://www.bing.com/webmasters/token |
There was a problem hiding this comment.
Use a refresh endpoint that OAuth2 refresh actually calls
For standard OAUTH2 providers, the refresh path is built from token_url in getSimpleOAuth2ClientConfig/oldAccessToken.refresh(...), while refresh_url is not used unless the provider goes through ProviderClient (and bing-webmasters is not in that list). In practice this means refreshes will still be sent to /webmasters/oauth/token, so if Bing requires /webmasters/token for refresh, connections will start failing once access tokens expire.
Useful? React with 👍 / 👎.
9b8db74 to
f751b2a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f751b2a419
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| refresh_token_params: | ||
| grant_type: refresh_token |
There was a problem hiding this comment.
Replace unsupported refresh_token_params in OAuth2 config
bing-webmasters is configured as auth_mode: OAUTH2, but this block uses refresh_token_params, which is only used in the TWO_STEP refresh path; the OAuth2 refresh flow reads refresh_params and otherwise falls back to token_params (getFreshOAuth2Credentials in packages/shared/lib/clients/oauth2.client.ts). Since token_params here sets grant_type: authorization_code, refresh requests will be sent with the wrong grant type after token expiry, causing refresh failures in production.
Useful? React with 👍 / 👎.
hassan254-prog
left a comment
There was a problem hiding this comment.
Thanks for the contribution, single comment otherwise looks good.
| authorization_url: https://www.bing.com/webmasters/oauth/authorize | ||
| token_url: https://www.bing.com/webmasters/oauth/token | ||
| refresh_url: https://www.bing.com/webmasters/token | ||
| default_scopes: |
There was a problem hiding this comment.
I would omit this here, default_scopes are mainly for scopes that are needed for connections to work properly, i.e offline_access for Oauth2 providers.
Also, remember to include a template logo with a max width or height of 44px, placed inside a 64px square container.
There was a problem hiding this comment.
Fixed! Removed default_scopes and added the logo as well.
f9c3bdb to
85daa2d
Compare
85daa2d to
671f6d7
Compare
Summary
Test plan
https://www.bing.com/webmaster/api.svc/json