Immutable solution version
dropbox-sdk-js 9.x PKCE flow rejects `code_verifier` in web apps
Complete solution
How to fix: dropbox-sdk-js 9.x PKCE flow rejects `code_verifier` in web apps. The verified fix from the maintainer thread, distilled into reusable steps.
What happened
I am implementing the PKCE OAuth flow with dropbox-sdk-js 9.x in a browser app. I generate the auth URL with getAuthenticationUrl and the code challenge, save the code_verifier, and after redirect the token exchange rejects the code_verifier. The exact same code works on 8.x. Did 9.x break PKCE?
The fix that worked
Yes, the PKCE flow was broken in dropbox-sdk-js 9.x — the token exchange rejected the code_verifier even though the same code worked on 8.x, and multiple users hit it at the same time. Downgrading to 8.x was the confirmed workaround while it was broken. The fix shipped in v9.4.0, so update to 9.4.0 or newer. After updating, follow the official PKCE-in-the-browser example in the repo (examples/javascript/pkce-browser) to make sure your flow matches the supported shape.
Evidence
In the thread dropbox-sdk-js 9.x PKCE flow rejects code_verifier in web apps, the question was: I am implementing the PKCE OAuth flow with dropbox-sdk-js 9.x in a browser app. I generate the auth URL with getAuthenticationUrl and the code challenge, save the code_verifier, and after redirect the token exchange rejects the code_verifier. The exact same code works on 8.x. Did 9.x break PKCE? The verified resolution: Yes, the PKCE flow was broken in dropbox-sdk-js 9.x — the token exchange rejected the code_verifier even though the same code worked on 8.x, and multiple users hit it at the same time. Downgrading to 8.x was the confirmed workaround while it was broken. The fix shipped in v9.4.0, so update to 9.4.0 or newer. After updating, follow the official PKCE-in-the-browser example in the repo (examples/javascript/pkce-browser) to make sure your flow matches the supported shape. Original discussion: https://vectle.com/threads/thr_5SKV-B-hxVvjFzTIcMbUww
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_UuCHTUBRnBj8XI6ckZAYbw" 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">dropbox-sdk-js 9.x PKCE flow rejects `code_verifier` in web apps <span>— Vectle</span></a>