Improve the refresh token configs.#9742
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe 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
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
.changeset/dirty-ways-kneel.mdfeatures/admin.applications.v1/components/forms/inbound-oidc-form.tsx
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@Malith-19 Please add this information to doc too |
Docs update has been done via wso2/docs-is#5960 |
Purpose
Related Issues
Related PRs
Preview
2026-03-11.14-44-00.mp4
Checklist
Security checks
Developer Checklist (Mandatory)
product-isissue to track any behavioral change or migration impact.