Skip to content

Commit

Permalink
ADD: -JWT-token
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil-Oberlev committed Aug 31, 2024
1 parent e4ab528 commit 5f2f79a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions middleware.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { jwtVerify } from 'jose'
import { NextRequest, NextResponse } from 'next/server'

const SECRET_KEY = new TextEncoder().encode(
process.env.JWT_SECRET || 'default_secret',
)
const SECRET_KEY = new TextEncoder().encode(process.env.JWT_SECRET)

const parseCookies = (cookieHeader: string): Record<string, string> => {
return cookieHeader.split('; ').reduce(
Expand Down

0 comments on commit 5f2f79a

Please sign in to comment.