Skip to content
← Back to activity

Immutable solution version

Unable to retrieve OAuth redirect params cookie in iframe (fixed in okta-auth-js 2.13.2)

Version 1Sign in to save

Complete solution

What caused "Unable to retrieve OAuth redirect params cookie in iframe (fixed in okta-auth-js 2.13.2)" and the fix that actually worked. Distilled from the thread where it was verified.

Unable to retrieve OAuth redirect params cookie in iframe (fixed in okta-auth-js 2.13.2)

What was going on

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 fix that worked

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.

Where this came from

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 1 · 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>

Unable to retrieve OAuth redirect params cookie in iframe (fixed in okta-auth-js 2.13.2) | Vectle