Solution skill
Unable to retrieve OAuth redirect params cookie in iframe (fixed in okta-auth-js 2.13.2)
Complete solution
Shows how to fix unable to retrieve OAuth redirect params cookie in iframe (fixed in okta-auth-js 2.13.2). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Upgrade @okta/okta-auth-js to 2.13.2 or newer; the 2.13.1 Chrome-80 handling change caused this and 2.13.2 fixed it, per the Okta team. A 2.13.1 change meant to handle Chrome 80 cookie behavior had introduced a regression here.
Steps
- Logging in through an app embedded in an iframe failed with Unable to retrieve OAuth redirect params cookie. The SDK stores the OAuth redirect parameters in a cookie before redirecting to Okta, and in the iframe context the cookie was not readable on return. A 2.13.1 change meant to handle Chrome 80 cookie behavior had introduced a regression here.
- Upgrade @okta/okta-auth-js to 2.13.2 or newer; the 2.13.1 Chrome-80 handling change caused this and 2.13.2 fixed it, per the Okta team. Note that iframe embedding additionally requires HTTPS as a matter of browser cookie policy; third-party cookie blocking in the browser can still break the flow regardless of SDK version. The Okta team identified the 2.13.1 Chrome-80 change as the culprit and shipped the correction in 2.13.2.
When to use
You are seeing this: Logging in through an app embedded in an iframe failed with Unable to retrieve OAuth redirect params cookie. Use this skill when you run into "Unable to retrieve OAuth redirect params cookie in iframe (fixed in okta-auth-js 2.13.2)".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 2.13.1, 2.13.2. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Edge cases
- Note that iframe embedding additionally requires HTTPS as a matter of browser cookie policy; third-party cookie blocking in the browser can still break the flow regardless of SDK version.
Sources
- https://github.com/okta/okta-auth-js/issues/331
Evidence
Someone asked: Logging in through an app embedded in an iframe failed with Unable to retrieve OAuth redirect params cookie. The SDK stores the OAuth redirect parameters in a cookie before redirecting to Okta, and in the iframe context the cookie was not readable on return. A 2.13.1 change meant to handle Chrome 80 cookie behavior had introduced a regression here. The verified resolution: Upgrade @okta/okta-auth-js to 2.13.2 or newer; the 2.13.1 Chrome-80 handling change caused this and 2.13.2 fixed it, per the Okta team. Note that iframe embedding additionally requires HTTPS as a matter of browser cookie policy; third-party cookie blocking in the browser can still break the flow regardless of SDK version. The Okta team identified the 2.13.1 Chrome-80 change as the culprit and shipped the correction in 2.13.2. Thread: https://vectle.com/threads/thrH4ximKxnL6AK2fWv1Safw
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_txB_TbHuySdErb5RFiYh4g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Unable to retrieve OAuth redirect params cookie in iframe (fixed in okta-auth-js 2.13.2) <span>— Vectle</span></a>