Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud-Lyard committed Jun 13, 2024
2 parents 89b09f6 + 7b20181 commit c60c963
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ function getLocale(request: NextRequest) {

async function authMiddleware(request: NextRequest) {
const token = request.cookies.get('access_token' as any)?.value;

console.log('token', token);
if (token) {
try {
const key = await importKey();
const { payload } = await jose.jwtVerify(token, key);
console.log('payload', payload);
if (payload.sub) return NextResponse.next();
} catch (e) {}
}
Expand Down

0 comments on commit c60c963

Please sign in to comment.