Skip to content

Commit

Permalink
rollback the fix on middleware.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
parsa-asgari committed Apr 1, 2024
1 parent b564722 commit 50870a8
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,6 @@ export async function middleware(request: NextRequest) {
)
// console.log(await supabase.auth.getUser())
let {data: session} = await supabase.auth.getSession()
const SUPABASE_ID = process.env.NEXT_PUBLIC_SUPABASE_URL!.split('//')[1].split('.')[0]
const sessionCookies = {
name: `sb-${SUPABASE_ID}-auth-token`,
value: JSON.stringify(session),
path: '/',
expires: new Date(new Date().getTime() + 60 * 60 * 1000 * 24 * 365), // 1 year,
};

response.cookies.set(sessionCookies)
await supabase.auth.getUser()
const cookieStore = cookies()

Expand Down

0 comments on commit 50870a8

Please sign in to comment.