File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ node_modules /
2+ .next /
3+ .env.local
4+ .env * .local
5+ * .tsbuildinfo
6+ playwright-report /
7+ test-results /
8+ coverage /
9+ .vercel /
Original file line number Diff line number Diff line change 11import Stripe from "stripe" ;
22
33export const stripe = new Stripe ( process . env . STRIPE_SECRET_KEY ! , {
4- apiVersion : "2024-10-28.acacia" ,
54 typescript : true ,
65} ) ;
76
Original file line number Diff line number Diff line change 1- import { createServerClient } from "@supabase/ssr" ;
1+ import { createServerClient , type CookieOptions } from "@supabase/ssr" ;
22import { NextResponse , type NextRequest } from "next/server" ;
33
44export async function updateSession ( request : NextRequest ) {
@@ -14,7 +14,7 @@ export async function updateSession(request: NextRequest) {
1414 getAll ( ) {
1515 return request . cookies . getAll ( ) ;
1616 } ,
17- setAll ( cookiesToSet ) {
17+ setAll ( cookiesToSet : { name : string ; value : string ; options : CookieOptions } [ ] ) {
1818 cookiesToSet . forEach ( ( { name, value, options } ) =>
1919 request . cookies . set ( name , value )
2020 ) ;
@@ -29,10 +29,6 @@ export async function updateSession(request: NextRequest) {
2929 }
3030 ) ;
3131
32- // Do not run code between createServerClient and
33- // supabase.auth.getUser(). A simple mistake could make it very hard to debug
34- // issues with users being randomly logged out.
35-
3632 const {
3733 data : { user } ,
3834 } = await supabase . auth . getUser ( ) ;
Original file line number Diff line number Diff line change 1- import { createServerClient } from "@supabase/ssr" ;
1+ import { createServerClient , type CookieOptions } from "@supabase/ssr" ;
22import { cookies } from "next/headers" ;
33
44export function createClient ( ) {
@@ -12,7 +12,7 @@ export function createClient() {
1212 getAll ( ) {
1313 return cookieStore . getAll ( ) ;
1414 } ,
15- setAll ( cookiesToSet ) {
15+ setAll ( cookiesToSet : { name : string ; value : string ; options : CookieOptions } [ ] ) {
1616 try {
1717 cookiesToSet . forEach ( ( { name, value, options } ) =>
1818 cookieStore . set ( name , value , options )
You can’t perform that action at this time.
0 commit comments