Extend Auth.js Types Globally #20
Reference in New Issue
Block a user
Delete Branch "issue-7"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves #7
Why exactly do we put it into a module?
We use module augmentation ('declare module') to extend the existing '@auth/sveltekit' interface globally. This makes SvelteKit's 'locals.auth()' return value strictly typed (including 'id' and 'email') across the entire project, removing the need for manual type casting or 'weird thingamajigs' in our server load functions and actions.
@@ -1,4 +1,4 @@FROM node:25-trixie AS baseFROM public.ecr.aws/docker/library/node:25-trixie AS basedo not change that