setCookie with supabase-js v2 #8420
Replies: 2 comments 1 reply
-
Thanks for bringing this up, I had middleware setup with Nextjs that was using supabase.auth.api.setAuthCookie(req,res) and am trying to figure out the alternative to the breaking change. |
Beta Was this translation helpful? Give feedback.
-
This was the comment on the change (pull request) FWIW. Cookie-related methods and helpers should be implemented where they are used. For example, in the auth-helpers library directly. I guess looking into how auth-helpers deals with it would be a stop, might also raise an issue in supabase/gotrue-js seeking advice. I don't use cookies, so can't help further. |
Beta Was this translation helpful? Give feedback.
-
With V1 I used await supabase.auth.api.setAuthCookie(req, res) but with V2 I don't see this option using admin, like: await supabase.auth.admin.setAuthCookie(req, res);
Is there an option with V2 ? I would like to implement it with Nextjs and middleware.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions