diff --git a/package-lock.json b/package-lock.json index 318b43d4..c36489d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.1.15", "dependencies": { "@babel/preset-env": "^7.23.9", - "@kinde-oss/kinde-typescript-sdk": "^2.6.2", + "@kinde-oss/kinde-typescript-sdk": "^2.7.1", "cookie": "^0.5.0", "crypto-js": "^4.1.1", "jwt-decode": "^3.1.2", @@ -2615,8 +2615,9 @@ } }, "node_modules/@kinde-oss/kinde-typescript-sdk": { - "version": "2.6.2", - "license": "MIT", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@kinde-oss/kinde-typescript-sdk/-/kinde-typescript-sdk-2.7.1.tgz", + "integrity": "sha512-YIig6htu7MdlrZ3OJNkgzk1JFxiO29MJPfDZu9o/ohs7b/ZKBTKje4QTYG9tjX4ipE5KDONBFQs4YT8tHZU/UQ==", "dependencies": { "jwt-decode": "^4.0.0", "uncrypto": "^0.1.3" diff --git a/package.json b/package.json index ef2b7e80..1a020b2c 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ }, "dependencies": { "@babel/preset-env": "^7.23.9", - "@kinde-oss/kinde-typescript-sdk": "^2.6.2", + "@kinde-oss/kinde-typescript-sdk": "^2.7.1", "cookie": "^0.5.0", "crypto-js": "^4.1.1", "jwt-decode": "^3.1.2", diff --git a/src/handlers/health.js b/src/handlers/health.js index 57efb8d6..12b9c641 100644 --- a/src/handlers/health.js +++ b/src/handlers/health.js @@ -1,6 +1,6 @@ -import RouterClient from '../routerClients/RouterClient'; import { config } from '../config/index' import { NextResponse } from "next/server"; +import { validateClientSecret } from '@kinde-oss/kinde-typescript-sdk'; /** * @@ -11,10 +11,10 @@ export const health = async () => { apiPath: config.apiPath, redirectURL: config.clientOptions.redirectURL, postLoginRedirectURL: config.postLoginRedirectURL, - issuerURL: config.issuerURL, - clientID: config.clientID, - clientSecret: config.clientSecret.match('[a-z0-9]{32}') ? 'Set correctly' : 'Not set correctly', - postLogoutRedirectURL: config.postLogoutRedirectURL, + issuerURL: config.issuerURL, + clientID: config.clientID, + clientSecret: validateClientSecret(config.clientSecret) ? 'Set correctly' : 'Not set correctly', + postLogoutRedirectURL: config.postLogoutRedirectURL, audience: config.audience, cookieDomain: config.cookieDomain, logoutRedirectURL: config.clientOptions.logoutRedirectURL