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

[Bug]: Send Scope with refresh token field gets resetted to No after authorisation - Authenticated API #29941

Closed
1 task done
NilanshBansal opened this issue Dec 29, 2023 · 0 comments · Fixed by #30012
Closed
1 task done
Assignees
Labels
Bug Something isn't working Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. Integrations Product Issues related to a specific integration Needs Triaging Needs attention from maintainers to triage QA Needs QA attention Query & JS Pod Issues related to the query & JS Pod

Comments

@NilanshBansal
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Description

I created new branch and updated the SF Datasource to send refresh token on expiry. But as you can see in the video below, after successfully authorizing and checking the Datasource configuration, we can see that Send scope with refresh token gets reset back to No, even after I set it to Yes during re-authorising.
Also I checked if there would be some changes to commit, nothing as well there.

Ref: https://theappsmith.slack.com/archives/CNQ9Q91C0/p1703084813482759?thread_ts=1702972094.026239&cid=CNQ9Q91C0

Steps To Reproduce

https://theappsmith.slack.com/archives/CNQ9Q91C0/p1703084813482759?thread_ts=1702972094.026239&cid=CNQ9Q91C0

Public Sample App

No response

Environment

Production

Issue video log

No response

Version

v1.9.58-SNAPSHOT

@NilanshBansal NilanshBansal added Bug Something isn't working Needs Triaging Needs attention from maintainers to triage Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. labels Dec 29, 2023
@NilanshBansal NilanshBansal self-assigned this Dec 29, 2023
@github-actions github-actions bot added Integrations Product Issues related to a specific integration labels Dec 29, 2023
Aishwarya-U-R pushed a commit that referenced this issue Jan 4, 2024
## Description

This PR fixes issue of `Send scope with refresh token` dropdown in
Authenticated API datasource. The issue was that this dropdown has a
default value of No, whenever we update this from No to Yes and save the
datasource, now if we edit this datasource, the value in this dropdown
should be Yes but it was going back to default No. This PR fixes that
issue

**Root cause:**
The issue occurred because in PR
#29393 we had set Auth API
dropdown values to default ones, so irrespective of the value in
datasource config, these dropdowns were getting set to default values.

**Solution:**
This PR updates the initial values, so that if this value is already
set, initial value is read from dsConfig, otherwise it's set to default
value

#### PR fixes following issue(s)
Fixes #29941
> if no issue exists, please create an issue and ask the maintainers
about this first
>
>
#### Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video
>
>
#### Type of change
> Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
>
>
>
## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [x] Manual
- [ ] JUnit
- [ ] Jest
- [ ] Cypress
>
>
#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Improved the conditional rendering logic in the data source editor for
a more intuitive user interface based on the selected authentication
method.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“[email protected]”>
@appsmith-bot appsmith-bot added the QA Needs QA attention label Jan 4, 2024
@github-actions github-actions bot added the Query & JS Pod Issues related to the query & JS Pod label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. Integrations Product Issues related to a specific integration Needs Triaging Needs attention from maintainers to triage QA Needs QA attention Query & JS Pod Issues related to the query & JS Pod
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants