wobsoriano / svelte-clerk

Community Clerk Svelte SDK.
Other
36 stars 4 forks source link

Error when running in production - Cookies and Headers #75

Closed emilianocalzada closed 3 weeks ago

emilianocalzada commented 3 weeks ago

👋 Hi there!

First, I want to express my appreciation for this awesome library - it has significantly accelerated my development process!

Issue Description

I'm encountering an error when deploying to Cloudflare Pages, specifically during the sign-in process.

Error Message

Error: Use `event.cookies.set(name, value, options)` instead of `event.setHeaders` to set cookies

Location The error occurs in: https://github.com/wobsoriano/svelte-clerk/blob/eb7964c18901ef2a9a7341f41fbebc965971de45/packages/svelte-clerk/src/lib/server/withClerkHandler.ts#L46C63-L47C1

wobsoriano commented 3 weeks ago

Oh, thanks for reporting this! Yeah I need to update that one as SvelteKit dont like setting headers like that