1.5.0 (2025-03-04)
Bug Fixes
This release addresses multiple inconsistencies with cookie handling x customization that might fix several issues:
- Setting persistSession: false still persists auth session (#390)
- The module doesn't recognize supabase.clientOptions.auth.flowType key (#449)
- Detecting session in URL is not working when sending "Password recovery" email manually from Supabase dashboard (#397)
- Static Hosting: Client side only rendering gives error when signing in with email - pw (#138)
Features
- Added
useSsrCookies
option (default:true
) → Resolves #186
This new option controls whether the module uses cookies to share session info between server and client. You must enable this option if you need to access session or user info from the server. It will use the SSR client from the @supabase/ssr library.
When disabled, the module will use the default Supabase client from the @supabase/supabase-js library which stores session info in local storage. This is useful in certain cases, such as statically generated sites or mobile apps where cookies might not be available.
-
Renamed
cookieName
→cookiePrefix
– More accurate naming. -
Renamed
cookieRedirect
→saveRedirectToCookie
– More accurate naming. -
New
useSupabaseCookieRedirect
composable – Simplifies handling redirect cookies without hardcoded names -
Docs updated:
useSsrCookies
→ https://supabase.nuxtjs.org/get-started#usessrcookiescookiePrefix
→ https://supabase.nuxtjs.org/get-started#cookieprefixasaveRedirectToCookie
→ https://supabase.nuxtjs.org/get-started#redirectoptionsuseSupabaseCookieRedirect
→ https://supabase.nuxtjs.org/usage/composables/usesupabasecookieredirect
Breaking Changes?
No. useSsrCookies
default value keep the old behaviour and deprecated options (cookieName, cookiePrefix) maintain backward compatibility.
Contributor 💚
A massive thanks to @Jordan-Ellis for this improvement.