Skip to content

fix: move OAuth2 expiry field next to scopes - #42191

Open
Leotrancoz0 wants to merge 1 commit into
appsmithorg:releasefrom
Leotrancoz0:fix/oauth2-expires-in-field-order
Open

fix: move OAuth2 expiry field next to scopes#42191
Leotrancoz0 wants to merge 1 commit into
appsmithorg:releasefrom
Leotrancoz0:fix/oauth2-expires-in-field-order

Conversation

@Leotrancoz0

@Leotrancoz0 Leotrancoz0 commented Sep 3, 2026

Copy link
Copy Markdown

Description

Moves the Authorization expires in (seconds) field directly after Scope(s) in the authenticated API OAuth2 form, so related authentication settings stay adjacent and easier to discover.

The field remains limited to the Authorization Code grant type, preserving the existing behavior for Client Credentials.

Fixes #31059

Testing

  • Prettier check for the changed file
  • ESLint for the changed file (0 errors; pre-existing warnings only)
  • TypeScript typecheck with tsc --noEmit --pretty false
  • Structural check confirming scopeStringexpiresInisAuthorizationHeader and a single expiresIn field

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Bug Fixes
    • Improved OAuth2 settings by displaying the expiration duration in the appropriate shared settings area.
    • The expiration duration is now shown only when the Authorization Code grant type is selected.

@Leotrancoz0
Leotrancoz0 requested a review from a team as a code owner September 3, 2026 14:32
@github-actions github-actions Bot added awaiting-maintainer The next action on this pull request belongs to an Appsmith maintainer external-contribution Pull request submitted from outside the Appsmith repository labels Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Thanks for contributing to Appsmith!

Credential-free formatting, lint, type, and unit checks will run after GitHub's workflow approval. An Appsmith maintainer will start privileged integration tests or a deploy preview when needed.

No action is required from you while this PR has the awaiting-maintainer label.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 86e850a6-eeda-4f85-9efa-c2bff438a110

📥 Commits

Reviewing files that changed from the base of the PR and between e43a783 and 716f49b.

📒 Files selected for processing (1)
  • app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


Walkthrough

The OAuth2 expiresIn field now appears after the shared OAuth2 settings for the Authorization Code grant type. The duplicate field is removed from the Authorization Code-specific section.

Changes

OAuth2 field placement

Layer / File(s) Summary
Shared OAuth2 expiration field
app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx
The shared OAuth2 settings render expiresIn only for the Authorization Code grant. The previous field location is removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 716f4

The Authorization Code expiration field is now displayed directly after Scope(s), while Client Credentials behavior remains unchanged. The change is ready to merge.

Suggested reviewers: amelia-c0n

Poem

OAuth fields gather in line
Scope and expiry now align
One grant reveals the way
Duplicate inputs fade away
Clearer settings greet the day

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary change: moving the OAuth2 expiry field next to the scope fields.
Description check ✅ Passed The description includes the change summary, motivation, linked issue, testing details, and communication decision. It is sufficiently complete for this focused change.
Linked Issues check ✅ Passed The implementation moves the OAuth2 expiresIn field after Scope(s) and keeps it limited to the Authorization Code grant type, matching issue #31059.
Out of Scope Changes check ✅ Passed The changes are limited to the OAuth2 datasource form and directly support the linked issue. No unrelated changes are identified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-maintainer The next action on this pull request belongs to an Appsmith maintainer external-contribution Pull request submitted from outside the Appsmith repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Move expires_in field after scope while configuring oauth2 datasource

1 participant