Skip to content

Improve the refresh token configs.#9742

Merged
Malith-19 merged 2 commits intowso2:masterfrom
Malith-19:improve-refresh-token-configs
Mar 12, 2026
Merged

Improve the refresh token configs.#9742
Malith-19 merged 2 commits intowso2:masterfrom
Malith-19:improve-refresh-token-configs

Conversation

@Malith-19
Copy link
Contributor

Purpose

  • This will improve the refresh token related configs in the applications by hiding the unrelated refresh token extend config while the renew refresh token is disabled.

Related Issues

Related PRs

Preview

2026-03-11.14-44-00.mp4

Checklist

  • e2e cypress tests locally verified. (for internal contributers)
  • Manual test round performed and verified.
  • UX/UI review done on the final implementation.
  • Documentation provided. (Add links if there are any)
  • Relevant backend changes deployed and verified
  • Unit tests provided. (Add links if there are any)
  • Integration tests provided. (Add links if there are any)

Security checks

Developer Checklist (Mandatory)

  • Complete the Developer Checklist in the related product-is issue to track any behavioral change or migration impact.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 90ed0c06-bee8-4f8c-a831-91fae895720f

📥 Commits

Reviewing files that changed from the base of the PR and between 041d7e4 and cad5d50.

📒 Files selected for processing (1)
  • features/admin.applications.v1/components/forms/inbound-oidc-form.tsx

📝 Walkthrough

Walkthrough

The PR adds a changeset entry and updates the inbound OIDC form component to conditionally hide the refresh token extend expiry configuration when the refresh renew token option is disabled.

Changes

Cohort / File(s) Summary
Changeset Entry
.changeset/dirty-ways-kneel.md
Adds changelog entry for patch updates across packages documenting UI change: hide refresh token extend configuration when refresh renew token is disabled.
OIDC Form Component
features/admin.applications.v1/components/forms/inbound-oidc-form.tsx
Adds local state synced from initialValues.refreshToken.renewRefreshToken; adds listener to update that state when RefreshToken option is selected; conditionally renders the extendExpiryTime field only when renewal is enabled.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Improve the refresh token configs.' directly relates to the main change: hiding the refresh token extend configuration when renew refresh token is disabled.
Description check ✅ Passed The description includes Purpose, Related Issues, Related PRs, and Preview sections with specific details; however, all checklist items remain unchecked, which may indicate incomplete testing and verification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Changeset Required ✅ Passed The PR includes a valid changeset file (.changeset/dirty-ways-kneel.md) that documents changes to @wso2is/admin.applications.v1 and @wso2is/console packages with appropriate patch version updates.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@features/admin.applications.v1/components/forms/inbound-oidc-form.tsx`:
- Around line 292-293: The local state isRenewRefreshTokenEnabled initialized
from initialValues only once and can go stale; add a useEffect that watches
initialValues (or initialValues?.refreshToken?.renewRefreshToken) and calls
setIsRenewRefreshTokenEnabled(initialValues?.refreshToken?.renewRefreshToken ??
false) to resync the flag whenever the form is hydrated or reused; place this
effect near the useState for isRenewRefreshTokenEnabled so the
checkbox/extend-expiry UI reflects saved values and isn’t dropped on submit.
- Around line 3672-3676: The listener on RefreshToken (the listen callback that
calls setIsRenewRefreshTokenEnabled) hides the "extendExpiryTime" checkbox but
doesn't clear its value, leaving stale data for updateConfiguration*() to
submit; change the listener so when RefreshToken becomes empty/disabled it also
resets/clears the form value for "extendExpiryTime" (same reset-on-disable
pattern used by the PKCE listener) so extendExpiryTime cannot remain true when
renew is off.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: dcefb86c-626a-48a9-962f-c091d634dd99

📥 Commits

Reviewing files that changed from the base of the PR and between 5e1ce13 and 041d7e4.

📒 Files selected for processing (2)
  • .changeset/dirty-ways-kneel.md
  • features/admin.applications.v1/components/forms/inbound-oidc-form.tsx

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.01%. Comparing base (9f537f2) to head (cad5d50).
⚠️ Report is 125 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9742   +/-   ##
=======================================
  Coverage   56.01%   56.01%           
=======================================
  Files          42       42           
  Lines        1023     1023           
  Branches      231      247   +16     
=======================================
  Hits          573      573           
+ Misses        450      416   -34     
- Partials        0       34   +34     
Flag Coverage Δ
@wso2is/core 56.01% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@piraveena
Copy link
Contributor

@Malith-19 Please add this information to doc too

@Malith-19 Malith-19 merged commit b30b3ca into wso2:master Mar 12, 2026
11 checks passed
@Malith-19
Copy link
Contributor Author

@Malith-19 Please add this information to doc too

Docs update has been done via wso2/docs-is#5960

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.

5 participants