Update @auth/sveltekit to latest stable version 1.10.0

- Upgraded @auth/sveltekit from 0.14.0 to 1.10.0
- Updated session API from event.locals.getSession() to event.locals.auth()
- Fixed TypeScript definitions for new auth API in app.d.ts
- Updated layout server load functions to use LayoutServerLoad type
- Fixed session callbacks with proper token type casting
- Switched to generic OIDC provider config to resolve issuer validation issues
- All auth functionality now working with latest Auth.js version
This commit is contained in:
2025-08-31 21:45:14 +02:00
parent 1133fa23e1
commit fb8394adfe
12 changed files with 156 additions and 91 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import * as auth from "./auth"
async function authorization({ event, resolve }) {
// Protect any routes under /authenticated
if (event.url.pathname.startsWith('/rezepte/edit') || event.url.pathname.startsWith('/rezepte/add')) {
const session = await event.locals.getSession();
const session = await event.locals.auth();
if (!session) {
redirect(303, '/auth/signin');
}