Skip to content

Setting persistSession: false still persists auth session #390

Closed
@AccountingSystems

Description

@AccountingSystems

I don't want to persist the auth session in my project, so in my nuxt.config.ts I set persistSession: false. But the auth session still persists and I can retrieve it when I try to get the current user await useSupabaseClient().auth.getUser()

Version

@nuxtjs/supabase:
nuxt:

Steps to reproduce

  1. Create a new project with the specified dependency versions
  2. Set your supabase section in nuxt.config.ts to
supabase: {
    cookieOptions: {
      secure: process.env.NODE_ENV === "production",
    },
    clientOptions: {
      auth: {
        persistSession: false,
      },
    },
  }
  1. Sign in
  2. close the website
  3. re-open the website
  4. Check for authentication status

What is Expected?

The authentication state is clear and no session or user currently exists/authenticated

What is actually happening?

The previously signed in user is authenticated and can be retrieved from the supabase client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions