ashleyconnor / sveltekit-supabase-demo

Demo application using SvelteKit, Supabase and Cloudflare Workers
39 stars 4 forks source link

event.method has been replaced by event.request.method #4

Open wanaranjor opened 2 years ago

wanaranjor commented 2 years ago

[feedback] I have this error when creating the cookie. Any idea to work it?

event.method has been replaced by event.request.method

reproduce https://github.com/wanaranjor/testsupabase-app

"@sveltejs/kit": "^1.0.0-next.260" "@supabase/supabase-js": "^1.30.0"

hooks.js

if (event.request.method === 'POST' && event.url.pathname === '/api/auth.json') {
    auth.api.setAuthCookie(event, toExpressResponse(response));
    response = toSvelteKitResponse(response);
  }

Updating hooks https://github.com/sveltejs/kit/pull/3384

wanaranjor commented 2 years ago

In the version next-233 it works fine!

"@sveltejs/kit": "1.0.0-next.233"

realjesset commented 2 years ago

is your changes still working?

wanaranjor commented 2 years ago

Yes..!