Skip to content

Commit aebffae

Browse files
committed
fix: tolerate stale supabase auth cookies
1 parent e9d94be commit aebffae

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎proxy.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ export async function proxy(request: NextRequest) {
3535
},
3636
);
3737

38-
const {
39-
data: { user },
40-
} = await supabase.auth.getUser();
38+
const { data, error } = await supabase.auth.getUser();
39+
const user = error ? null : data.user;
4140

4241
const path = request.nextUrl.pathname;
4342
const isApp =

0 commit comments

Comments
 (0)