diff --git a/package.json b/package.json index 85828fec2..8de8d4f61 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@stripe/stripe-js": "1.22.0", - "@supabase/supabase-auth-helpers": "^1.2.0", + "@supabase/supabase-auth-helpers": "^1.2.1", "classnames": "2.3.1", "next": "^12.0.9", "react": "17.0.2", diff --git a/pages/api/auth/[...supabase].ts b/pages/api/auth/[...supabase].ts index faa524262..2c03c57e5 100644 --- a/pages/api/auth/[...supabase].ts +++ b/pages/api/auth/[...supabase].ts @@ -1,3 +1,6 @@ import { handleAuth } from '@supabase/supabase-auth-helpers/nextjs'; -export default handleAuth({ logout: { returnTo: '/signin' } }); +export default handleAuth({ + logout: { returnTo: '/signin' }, + cookieOptions: { lifetime: 1 * 365 * 24 * 60 * 60 } // Keep the user logged in for a year. +}); diff --git a/yarn.lock b/yarn.lock index b55d5ef14..476efd040 100644 --- a/yarn.lock +++ b/yarn.lock @@ -138,10 +138,10 @@ dependencies: cross-fetch "^3.1.0" -"@supabase/supabase-auth-helpers@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@supabase/supabase-auth-helpers/-/supabase-auth-helpers-1.2.0.tgz#fb92fcee30001a03b0d222ed3035448747facd8d" - integrity sha512-k7l4bkHLOyNgLNLW+zdn+iWvvYy65S9XIIZktAw+zIoxJr182jV4LO5/bVb0Zs3AFqDkPLSq9PoTJaRwoTV7hw== +"@supabase/supabase-auth-helpers@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@supabase/supabase-auth-helpers/-/supabase-auth-helpers-1.2.1.tgz#974fae06c5d19c22d5dedd9743cef6194cbde3a8" + integrity sha512-WZF1tMRmHM3ZEYaPM3Alaa5im73XV6Y+S23yTsm0s6HW15p1dNkPpB3H1cUNy9NOCMLfzc4TC6/MSpP0+vk6Ow== dependencies: "@supabase/supabase-js" "^1.30.0" "@supabase/ui" "^0.36.3"