Skip to content

Commit bc522cb

Browse files
committed
deps: update-ts-sdk-and-use-validateClientSecret
1 parent a5877bb commit bc522cb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"svelte": "^4.0.0"
4545
},
4646
"dependencies": {
47-
"@kinde-oss/kinde-typescript-sdk": "^2.6.2"
47+
"@kinde-oss/kinde-typescript-sdk": "^2.7.2"
4848
},
4949
"devDependencies": {
5050
"@playwright/test": "^1.28.1",

src/lib/handleAuth/handleAuth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {kindeAuthClient} from '$lib/KindeSDK.js';
22
import {kindeConfiguration} from '$lib/index.js';
33
import {parseSearchParamsToObject} from '$lib/utils/index.js';
4-
import type {SessionManager} from '@kinde-oss/kinde-typescript-sdk';
4+
import {type SessionManager, validateClientSecret} from '@kinde-oss/kinde-typescript-sdk';
55
import {error, redirect, type RequestEvent} from '@sveltejs/kit';
66
import {version} from '$app/environment';
77

@@ -29,7 +29,7 @@ export async function handleAuth({
2929
redirectURL: kindeConfiguration.redirectURL || '',
3030
audience: kindeConfiguration.audience || '',
3131
scope: kindeConfiguration.scope || '',
32-
clientSecret: kindeConfiguration.clientSecret.match('[a-z0-9]{32}')
32+
clientSecret: validateClientSecret(kindeConfiguration.clientSecret || '')
3333
? 'Set correctly'
3434
: 'Not set correctly',
3535
loginRedirectURL: kindeConfiguration.loginRedirectURL || '',

0 commit comments

Comments
 (0)