v8 -> v10.0.1-rc.x
This is the direct migration path from oidc-spa v8 to v10.
It’s basically v8 → v9 + v9 → v10, but written as a single flow.
1) Renames (v8 → v9)
These are pure renames. A simple search/replace is enough:
- import { ... } from "oidc-spa";
+ import { ... } from "oidc-spa/core";
- import { ... } from "oidc-spa/mock";
+ import { ... } from "oidc-spa/core-mock";
- import { ... } from "oidc-spa/tools/decodeJwt";
+ import { ... } from "oidc-spa/decode-jwt";
- oidc.params.issuerUri;
+ oidc.issuerUri;
- oidc.params.clientId;
+ oidc.clientId;
- oidc.params.validRedirectUri;
+ oidc.validRedirectUri;
- const { unusbscribe } = oidc.subscribeToTokensChange(...);
+ const { unsubscribeFromTokensChange } = oidc.subscribeToTokensChange(...);
createOidc({
- noIframe: true
+ sessionRestorationMethod: "full page redirect"
});2) homeUrl removed (v8 → v9)
homeUrl removed (v8 → v9)That’s it.
The base url is now provided to oidcEarlyInit:
3) Security defenses config (v8 → v10)
In v9, security defenses were reworked. In v10, DPoP became global, and token-substitution options were renamed.
Vite plugin
Manual (no Vite plugin)
Takeaways (v9 → v10)
trustedThirdPartyResourceServerswas renamed totrustedExternalResourceServers.Same-site wildcards (like
*.my-domain.com) are not trusted by default anymore. Add them explicitly if you relied on that.DPoP is now configured globally via
DPoP/DPoP: { ... }.
4) Remove per-client dpop option (v9 → v10)
dpop option (v9 → v10)If you previously had this:
Remove it. DPoP is now configured globally (see above).
5) Update of keycloakUtils.getAccountUrl() API (v8 → v9)
keycloakUtils.getAccountUrl() API (v8 → v9)The “back to app” URL now must be a valid redirect URI:
6) Removal of oidc-spa/tools/parseKeycloakIssuerUri (v8 → v9)
oidc-spa/tools/parseKeycloakIssuerUri (v8 → v9)There are now Keycloak utilities:
7) React entrypoint rename (breaking) (v8 → v9)
Breaking change. oidc-spa/react has been removed. Use oidc-spa/react-spa.
Use the new integration guide:
8) Server entrypoint rename (breaking) (v8 → v9)
Breaking change. oidc-spa/backend has been removed. Use oidc-spa/server.
Use the new docs:
9) crypto.subtle polyfill (v8 → v9)
crypto.subtle polyfill (v8 → v9)oidc-spa now auto-polyfills crypto.subtle when it’s missing.
If you previously added webcrypto-liner-shim, you can remove it.
Need a hand?
If you hit a migration edge case, ask on Discord:
Last updated
Was this helpful?