Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

add support for Edge routes. #1

@multiplehats

Description

@multiplehats

Edge routes are currently not supported because of SvelteKitAuth in hooks.server.ts. Because hooks.server.ts intercepts each requests, it will load the Authjs config, and in turn load Prisma.

Have solved this in other projects by copying over these functions and changing /auth/ to /api/auth/ and creating a custom +page.server.ts handle. (adopted from the SvelteKitAuth handle)

But for this template it's probably better to wait until this hardcoded path is fixed upstream and these functions allow for custom base paths so that our custom +page.server.ts "handle" can go in /src/routes/api/auth/[...authjs] next to the custom tRPC handle entrypoint (the custom tRPC is also there for that very reason, to support one-off edge routes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions