Skip to content

Commit

Permalink
Remove Auth logging
Browse files Browse the repository at this point in the history
  • Loading branch information
CannonLock committed Sep 19, 2024
1 parent 69bfc87 commit ee8c17e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions server/vike-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ export async function vikeHandler<
Context extends Record<string | number | symbol, unknown>
>(request: Request, context?: Context): Promise<Response> {
const cookies = getCookies(request);

console.log(cookies);

const user = await getUserFromCookie(cookies);

console.log(user);

const pageContextInit = {
...context,
urlOriginal: request.url,
Expand Down Expand Up @@ -46,8 +41,6 @@ async function getUserFromCookie(cookies: Record<string, string>) {
const authHeader = cookies?.Authorization;
const secret = new TextEncoder().encode(process.env.SECRET_KEY);
const jwt = authHeader.substring(7, authHeader.length);

console.log(cookies, jwt);
// We probably don't need to verify the JWT on each request
user = (await jose.jwtVerify(jwt, secret)).payload;
} catch (e) {
Expand Down

0 comments on commit ee8c17e

Please sign in to comment.