Collin
Collin
DTDrizzle Team
Created by Collin on 11/22/2023 in #help
auth err?
Event: checkout.session.completed PostgresError: password authentication failed for user "postgres" at ErrorResponse (file:///C:/Users/collin/Desktop/svelte/node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:771:26) at handle (file:///C:/Users/collin/Desktop/svelte/node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:473:6) at Socket.data (file:///C:/Users/collin/Desktop/svelte/node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:314:9) at Socket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Readable.push (node:internal/streams/readable:234:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23) my pass is correct maybe im special buty idk what im doin wrong
const client = postgres(
'postgresql://postgres:[]@db.dcyhrtbirlotjtpauchr.supabase.co:5432/postgres'
);
event.locals.supabase = createSupabaseServerClient({
supabaseUrl: PUBLIC_SUPABASE_URL,
supabaseKey: PUBLIC_SUPABASE_ANON_KEY,
event
});

/**
* a little helper that is written for convenience so that instead
* of calling `const { data: { session } } = await supabase.auth.getSession()`
* you just call this `await getSession()`
*/

// const { error } = await event.locals.supabase.auth.signOut();

event.locals.getSession = async () => {
const {
data: { session }
} = await event.locals.supabase.auth.getSession();
return session;
};

event.locals.database = drizzle(client);
const client = postgres(
'postgresql://postgres:[]@db.dcyhrtbirlotjtpauchr.supabase.co:5432/postgres'
);
event.locals.supabase = createSupabaseServerClient({
supabaseUrl: PUBLIC_SUPABASE_URL,
supabaseKey: PUBLIC_SUPABASE_ANON_KEY,
event
});

/**
* a little helper that is written for convenience so that instead
* of calling `const { data: { session } } = await supabase.auth.getSession()`
* you just call this `await getSession()`
*/

// const { error } = await event.locals.supabase.auth.signOut();

event.locals.getSession = async () => {
const {
data: { session }
} = await event.locals.supabase.auth.getSession();
return session;
};

event.locals.database = drizzle(client);
'
4 replies