@keycloak/keycloak-admin-client 26.5.3 → 26.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,8 @@
1
1
  export function decodeToken(token) {
2
- const [, payload] = token.split(".");
2
+ const [, payload] = token?.split(".") || [];
3
3
  if (typeof payload !== "string") {
4
- throw new Error("Unable to decode token, payload not found.");
4
+ console.info("Unable to decode token, payload not found.");
5
+ return {};
5
6
  }
6
7
  let decoded;
7
8
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keycloak/keycloak-admin-client",
3
- "version": "26.5.3",
3
+ "version": "26.5.4",
4
4
  "description": "A client to interact with Keycloak's Administration API",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",