Skip to content

fix: Move expires_in field after scope in OAuth2 datasource form#41833

Open
algojogacor wants to merge 1 commit into
appsmithorg:releasefrom
algojogacor:fix/move-expires-in-after-scope-oauth2
Open

fix: Move expires_in field after scope in OAuth2 datasource form#41833
algojogacor wants to merge 1 commit into
appsmithorg:releasefrom
algojogacor:fix/move-expires-in-after-scope-oauth2

Conversation

@algojogacor
Copy link
Copy Markdown

@algojogacor algojogacor commented May 21, 2026

This is an independent contribution and is not affiliated with any hackathon or competition.

Summary
The expires_in input field in the OAuth2 datasource configuration form was placed below Custom Authentication Parameters, separated from the other authentication fields. This made it harder for users to discover.

Root Cause
The expires_in field was rendered inside renderOauth2AdvancedSettings, after Custom Authentication Parameters, rather than alongside the related authentication fields in renderOauth2Common.

Fix
Moved the expires_in input field from renderOauth2AdvancedSettings to renderOauth2Common, placing it directly after the Scope(s) field. All authentication fields are now adjacent for improved discoverability.

Testing

  • Verified the field renders in the correct position after Scope(s)
  • Confirmed no duplicate rendering (old location removed)
  • Change is a pure JSX reorder with no logic modification

Summary by CodeRabbit

  • Refactor
    • Reorganized OAuth2 configuration form to make the authorization expiration setting available across all OAuth2 authentication types instead of specific flows only.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f9a80b25-a0ed-4a62-8858-c9b223f33cb6

📥 Commits

Reviewing files that changed from the base of the PR and between d44df5f and 4e11153.

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

Walkthrough

The OAuth2 "Authorization expires in (seconds)" form input field (authentication.expiresIn) is relocated from the Authorization Code-specific UI section to the shared OAuth2 common settings section. This allows the expiry field to be rendered as part of common OAuth2 configuration rather than only within Authorization Code flows.

Changes

OAuth2 Expiry Field Relocation

Layer / File(s) Summary
OAuth2 expires-in field relocation
app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx
The authentication.expiresIn input is moved from the Authorization Code-specific UI into the shared OAuth2 common settings section, allowing broader reuse across OAuth2 flow types.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🔄 A field finds its home,

From specific to shared it roams,

OAuth2 flows now align,

Expiry settings shine. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: moving the expires_in field after scope in OAuth2 datasource form.
Description check ✅ Passed The description covers motivation (discoverability), root cause, fix details, and testing. While it doesn't reference an issue number, the submission includes adequate context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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.

1 participant