fix(oidc-client): forward loginHint, acrValues, query via buildAuthorizeOptions - #749
fix(oidc-client): forward loginHint, acrValues, query via buildAuthorizeOptions#749vatsalparikh wants to merge 1 commit into
Conversation
…dAuthorizeOptions authorize.url() read these fields from config but buildAuthorizeOptions (used by authorizeµ and therefore authorize.background) did not, so post-login silent renewals dropped them silently.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
View your CI Pipeline Execution ↗ for commit 0de9b1e
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
@forgerock/davinci-client
@forgerock/device-client
@forgerock/journey-client
@forgerock/oidc-client
@forgerock/protect
@forgerock/sdk-types
@forgerock/sdk-utilities
@forgerock/iframe-manager
@forgerock/sdk-logger
@forgerock/sdk-oidc
@forgerock/sdk-request-middleware
@forgerock/storage
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #749 +/- ##
===========================================
+ Coverage 18.07% 70.06% +51.99%
===========================================
Files 155 22 -133
Lines 24398 1871 -22527
Branches 1203 316 -887
===========================================
- Hits 4410 1311 -3099
+ Misses 19988 560 -19428
🚀 New features to boost your workflow:
|
|
Deployed 9219ee0 to https://ForgeRock.github.io/ping-javascript-sdk/pr-749/9219ee041184fcddc12b92c761cfcaa557c4e8c0 branch gh-pages in ForgeRock/ping-javascript-sdk |
📦 Bundle Size Analysis📦 Bundle Size Analysis🆕 New Packages🆕 @forgerock/davinci-client - 56.7 KB (new) 14 packages analyzed • Baseline from latest Legend🆕 New package ℹ️ How bundle sizes are calculated
🔄 Updated automatically on each push to this PR |
Summary
buildAuthorizeOptionsonly forwardedclientId/redirectUri/scope/responseTypefrom config, ignoringloginHint,nonce,display,prompt,uiLocales,acrValues, andquery.authorize.url()already read all seven fields from config correctly (client.store.ts lines 178–184), butauthorizeµ— used byauthorize.background()— went throughbuildAuthorizeOptionsand dropped them.authorize.background()never included these values in the authorize URL, even when configured.Fix
Add the same seven config-field spreads to
buildAuthorizeOptionsinauthorize.request.utils.ts, matching the pattern already inauthorize.url(). Caller-suppliedoptionsstill override config-level values (existing spread order preserved).Tests
Added four new unit tests to
authorize.request.utils.test.ts:loginHint,acrValues,queryfrom confignonce,display,prompt,uiLocalesfrom configTest plan
nx test oidc-clientpasses (32 tests in authorize.request.utils, all green)authorize.background()now carrieslogin_hint,acr_values,ui_localesin the authorize URL when configured