Lucia Authentication #8
1 changed files with 1 additions and 2 deletions
|
|
@ -2,8 +2,7 @@ import { Lucia } from 'lucia';
|
|||
|
You dont need to set it to a const... You dont need to set it to a const...
Reuse the Reuse the `$lib/server/prisma` client plz
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 { prisma } from '$lib/server/prisma';
|
||||
|
||||
const client = prisma;
|
||||
|
Reuse the Reuse the `$lib/server/prisma` client plz
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);
|
||||
|
Reuse the Reuse the `$lib/server/prisma` client plz
You dont need to set it to a const... You dont need to set it to a const...
|
||||
const adapter = new PrismaAdapter(prisma.session, prisma.user);
|
||||
|
Reuse the Reuse the `$lib/server/prisma` client plz
You dont need to set it to a const... You dont need to set it to a const...
|
||||
// expect error (see next section)
|
||||
export const auth = new Lucia(adapter, {
|
||||
sessionCookie: {
|
||||
|
|
|
|||
|
Reuse the Reuse the `$lib/server/prisma` client plz
You dont need to set it to a const... You dont need to set it to a const...
Reuse the Reuse the `$lib/server/prisma` client plz
You dont need to set it to a const... You dont need to set it to a const...
|
||||
Loading…
Add table
Reference in a new issue
Reuse the
$lib/server/prismaclient plz