githubEdit

upv8 -> v9

Renames

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"
});

homeUrl removed

That's it.

Vite Plugin and oidcEarlyInit Params changes

oidc-spa's security features have been reworked, see: Security Features

This is the changes you need to apply to migrate your current config while keeping the same security profile:

If you’re migrating from the older freeze* flags:

Update of keycloakUtils.getAccountUrl() API

The "back to app" url actually only allows to redirect to a valid redirect uri.

Removal of oidc-spa/tools/parseKeycloakIssuerUri

There is now more comprehensive keycloak integration utils: Keycloak Utils

React entrypoint rename (breaking)

circle-exclamation

The overall approach is the same, but the API changed significantly.

Use the new integration guide:

React SPA integration guide

Server entrypoint rename (breaking)

circle-exclamation

This was required to support DPoP. It also cleans up the API.

Use the new docs: Server integration guide

crypto.subtle polyfill

oidc-spa now auto-polyfills crypto.subtle when it’s missing (typically when not served over HTTPS). This has no bundle size impact.

If you previously added webcrypto-liner-shim as described here, you can remove it.

Need a hand?

If you hit a migration edge case, ask on Discord:

Discord invite

Last updated

Was this helpful?