Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

abetterway-dev/netlify_nuxt3supabase_workaround

Repository files navigation

Nuxt 3, Netlify & useSupabaseUser() cookie glitch workaround

(ISSUE HAS BEEN PATCHED)

I am still getting issue #98 (Cookie Issues) on my netlify deploys using @nuxtjs/supabase 0.3.0 this my workaround.

Option 1

Add and remove the cookies: 'sb-access-token' / 'sb-refresh-token' on signout and successful signin with useCookie.

Option 2

Alternatively, you can deploy modifying node_modules/nitropack/dist/runtime/entries/netlify.mjs >> to return without normalizeOutgoingHeaders(r.headers).

  • include 'enableNetlifyCookies.js'
  • change your build script in your package.json to "node ./enableNetlifyCookies.js && nuxt build"

This will remove the the normalizeOutgoingHeaders from the nitropack preset file for netlify.

About

Workaround for Netlify, NitroJS/NUXT and Supabase Auth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published