Skip to content

Commit

Permalink
Merge pull request #23 from kinde-oss/deps/update-ts-sdk-and-use-vali…
Browse files Browse the repository at this point in the history
…dateClientSecret

deps: update-ts-sdk-and-use-validateClientSecret
  • Loading branch information
DaveOrDead authored Mar 11, 2024
2 parents b32b168 + bc522cb commit 14f1d13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"svelte": "^4.0.0"
},
"dependencies": {
"@kinde-oss/kinde-typescript-sdk": "^2.6.2"
"@kinde-oss/kinde-typescript-sdk": "^2.7.2"
},
"devDependencies": {
"@playwright/test": "^1.28.1",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/handleAuth/handleAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {kindeAuthClient} from '$lib/KindeSDK.js';
import {kindeConfiguration} from '$lib/index.js';
import {sessionStorage} from '$lib/sessionStorage/sessionStorage.js';
import {parseSearchParamsToObject} from '$lib/utils/index.js';
import type {SessionManager} from '@kinde-oss/kinde-typescript-sdk';
import {type SessionManager, validateClientSecret} from '@kinde-oss/kinde-typescript-sdk';
import {error, redirect, type RequestEvent} from '@sveltejs/kit';
import {version} from '$app/environment';

Expand Down Expand Up @@ -33,7 +33,7 @@ export async function handleAuth({
redirectURL: kindeConfiguration.redirectURL || '',
audience: kindeConfiguration.audience || '',
scope: kindeConfiguration.scope || '',
clientSecret: kindeConfiguration.clientSecret.match('[a-z0-9]{32}')
clientSecret: validateClientSecret(kindeConfiguration.clientSecret || '')
? 'Set correctly'
: 'Not set correctly',
loginRedirectURL: kindeConfiguration.loginRedirectURL || '',
Expand Down

0 comments on commit 14f1d13

Please sign in to comment.