-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
32d8b27
commit 54e452a
Showing
9 changed files
with
4,116 additions
and
5,106 deletions.
There are no files selected for viewing
Submodule collection-tracker-redis
updated
from bd56f2 to e5f4ba
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// hooks.server.ts | ||
import { auth } from "$lib/lucia"; | ||
// import { auth } from "$lib/lucia"; | ||
import type { Handle } from "@sveltejs/kit"; | ||
|
||
export const handle: Handle = async ({ event, resolve }) => { | ||
event.locals.auth = auth.handleRequest(event); | ||
return await resolve(event); | ||
}; | ||
// export const handle: Handle = async ({ event, resolve }) => { | ||
// event.locals.auth = auth.handleRequest(event); | ||
// return await resolve(event); | ||
// }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
// lib/server/lucia.ts | ||
import lucia from "lucia-auth"; | ||
import { sveltekit } from "lucia-auth/middleware"; | ||
import lucia from "lucia"; | ||
// import { sveltekit } from "lucia-auth/middleware"; | ||
import prisma from "@lucia-auth/adapter-prisma"; | ||
import { PrismaClient } from "@prisma/client"; | ||
import { dev } from "$app/environment"; | ||
|
||
export const auth = lucia({ | ||
adapter: prisma(new PrismaClient()), | ||
env: dev ? "DEV" : "PROD", | ||
middleware: sveltekit() | ||
}); | ||
// export const auth = lucia({ | ||
// adapter: prisma(new PrismaClient()), | ||
// env: dev ? "DEV" : "PROD", | ||
// middleware: sveltekit() | ||
// }); | ||
|
||
export type Auth = typeof auth; | ||
// export type Auth = typeof auth; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// +layout.server.ts | ||
import { auth } from "$lib/lucia"; | ||
// import { auth } from "$lib/lucia"; | ||
|
||
// export const load = auth.handleServerSession(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters