Skip to content

Commit

Permalink
update typing
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-stytch committed Aug 29, 2024
1 parent 42d19bc commit 1385cc0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion components/SessionDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ function SessionDemo() {
const start = performance.now();
const resp = await fetch('/api/sessions/authenticate_jwt', { method: 'POST' });
const data = await resp.json();
console.log(data);
const end = performance.now();

setJwtMetrics({ requestTime: Math.floor(end - start), authenticateTime: data.net_ms });
Expand Down
2 changes: 1 addition & 1 deletion pages/api/sessions/authenticate_jwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function handler(req: NextApiRequest, res: NextApiResponse<Response
// Start a timer to measure authentication process time
const start = process.hrtime();
// Authenticate the session JWT. If an error is thrown the session authentication has failed.
const resp = await stytchClient.sessions.authenticateJwt(stytchSessionJWT);
const resp = await stytchClient.sessions.authenticateJwt({session_jwt: stytchSessionJWT});
// End the timer
const end = process.hrtime(start);

Expand Down

0 comments on commit 1385cc0

Please sign in to comment.