Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for Edge routes. #1

Open
multiplehats opened this issue Jun 23, 2023 · 0 comments
Open

add support for Edge routes. #1

multiplehats opened this issue Jun 23, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@multiplehats
Copy link
Owner

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)

@multiplehats multiplehats added the enhancement New feature or request label Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant