diff --git a/examples/nextjs-pages/package.json b/examples/nextjs-pages/package.json index f1999665..9d51e0e4 100644 --- a/examples/nextjs-pages/package.json +++ b/examples/nextjs-pages/package.json @@ -12,6 +12,7 @@ "dependencies": { "@supabase/auth-helpers-nextjs": "workspace:*", "autoprefixer": "10.4.14", + "encoding": "^0.1.13", "next": "13.4.4", "postcss": "8.4.24", "react": "18.2.0", diff --git a/examples/sveltekit/src/routes/(app)/+layout.svelte b/examples/sveltekit/src/routes/(app)/+layout.svelte index fa0c3e36..8b2d2e0e 100644 --- a/examples/sveltekit/src/routes/(app)/+layout.svelte +++ b/examples/sveltekit/src/routes/(app)/+layout.svelte @@ -8,11 +8,8 @@ const handleLogout: SubmitFunction = () => { loading = true; return async ({ result }) => { - if (result.type === 'redirect') { - await invalidate('supabase:auth'); - } else { - await applyAction(result); - } + await invalidate('supabase:auth'); + await applyAction(result); loading = false; }; }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dbaf1643..b11f1c55 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -86,6 +86,9 @@ importers: autoprefixer: specifier: 10.4.14 version: 10.4.14(postcss@8.4.24) + encoding: + specifier: ^0.1.13 + version: 0.1.13 next: specifier: 13.4.4 version: 13.4.4(react-dom@18.2.0)(react@18.2.0) @@ -5000,6 +5003,12 @@ packages: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} + /encoding@0.1.13: + resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} + dependencies: + iconv-lite: 0.6.3 + dev: false + /end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} dependencies: @@ -6692,6 +6701,13 @@ packages: dependencies: safer-buffer: 2.1.2 + /iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + dependencies: + safer-buffer: 2.1.2 + dev: false + /icss-utils@5.1.0(postcss@8.4.24): resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} engines: {node: ^10 || ^12 || >= 14}