Is this Valid way to fetch session? in SSR

I have setup my auth in a separate hono server and from my frontend (sveltekit) i want to get the session server side so that I can protect routes. I have access to authClient but not the auth instance because all auth logic is handled by the separate backend. The way im doing this is working im just wondering if this approach is correct or maybe theres a better way to solve this?
No description
2 Replies
sebastian
sebastian2mo ago
This works fine, ensure tho where's proper types on the event and resolve (dk if this is sveltekit thing)
sik
sikOP2mo ago
updated the code to handle set cookies
No description

Did you find this page helpful?