Lucia Authentication #8

Merged
DanMihailescu merged 18 commits from undoPretty into master 2024-12-19 20:06:45 -05:00
Showing only changes of commit a16b6277eb - Show all commits

View file

@ -2,8 +2,7 @@ import { Lucia } from 'lucia';
BenjaminPalko commented 2024-12-17 14:11:26 -05:00 (Migrated from github.com)
Review

Reuse the $lib/server/prisma client plz

Reuse the `$lib/server/prisma` client plz
BenjaminPalko commented 2024-12-18 12:33:08 -05:00 (Migrated from github.com)
Review

You dont need to set it to a const...

You dont need to set it to a const...
BenjaminPalko commented 2024-12-17 14:11:26 -05:00 (Migrated from github.com)
Review

Reuse the $lib/server/prisma client plz

Reuse the `$lib/server/prisma` client plz
BenjaminPalko commented 2024-12-18 12:33:08 -05:00 (Migrated from github.com)
Review

You dont need to set it to a const...

You dont need to set it to a const...
import { PrismaAdapter } from '@lucia-auth/adapter-prisma'; import { PrismaAdapter } from '@lucia-auth/adapter-prisma';
import { prisma } from '$lib/server/prisma'; import { prisma } from '$lib/server/prisma';
const client = prisma; const adapter = new PrismaAdapter(prisma.session, prisma.user);
BenjaminPalko commented 2024-12-17 14:11:26 -05:00 (Migrated from github.com)
Review

Reuse the $lib/server/prisma client plz

Reuse the `$lib/server/prisma` client plz
BenjaminPalko commented 2024-12-18 12:33:08 -05:00 (Migrated from github.com)
Review

You dont need to set it to a const...

You dont need to set it to a const...
BenjaminPalko commented 2024-12-17 14:11:26 -05:00 (Migrated from github.com)
Review

Reuse the $lib/server/prisma client plz

Reuse the `$lib/server/prisma` client plz
BenjaminPalko commented 2024-12-18 12:33:08 -05:00 (Migrated from github.com)
Review

You dont need to set it to a const...

You dont need to set it to a const...
const adapter = new PrismaAdapter(client.session, client.user);
BenjaminPalko commented 2024-12-17 14:11:26 -05:00 (Migrated from github.com)
Review

Reuse the $lib/server/prisma client plz

Reuse the `$lib/server/prisma` client plz
BenjaminPalko commented 2024-12-18 12:33:08 -05:00 (Migrated from github.com)
Review

You dont need to set it to a const...

You dont need to set it to a const...
// expect error (see next section) // expect error (see next section)
export const auth = new Lucia(adapter, { export const auth = new Lucia(adapter, {
sessionCookie: { sessionCookie: {

BenjaminPalko commented 2024-12-17 14:11:26 -05:00 (Migrated from github.com)
Review

Reuse the $lib/server/prisma client plz

Reuse the `$lib/server/prisma` client plz
BenjaminPalko commented 2024-12-18 12:33:08 -05:00 (Migrated from github.com)
Review

You dont need to set it to a const...

You dont need to set it to a const...
BenjaminPalko commented 2024-12-17 14:11:26 -05:00 (Migrated from github.com)
Review

Reuse the $lib/server/prisma client plz

Reuse the `$lib/server/prisma` client plz
BenjaminPalko commented 2024-12-18 12:33:08 -05:00 (Migrated from github.com)
Review

You dont need to set it to a const...

You dont need to set it to a const...