Skip to content

Refreshing a page removes the cookie using the local provider #732

@jorni-moddit

Description

@jorni-moddit

Environment

  • Operating System: Darwin
  • Node Version: v18.15.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: npm@9.5.0
  • Builder: -
  • User Config: devtools, app, runtimeConfig, modules, auth, i18n, image, css, nitro, vite, routeRules
  • Runtime Modules: @nuxtjs/i18n@8.3.0, @nuxt/image@1.5.0, @vueuse/nuxt@10.9.0, @sidebase/nuxt-auth@0.7.1
  • Build Modules: -

Reproduction

We're using a WordPress back-end with the simple-JWT plugin.
For this example I returned a hardcoded body in the api/auth/[...].ts
And there is a simple login form.

https://stackblitz.com/edit/github-gpkaqq?file=server%2Fapi%2Fauth%2F[...].ts

Describe the bug

After logging in a cookie is set, when not configured it's under auth.token and I have an authenticated state.
image

After a page refresh this cookie is removed.
image

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.xbugA bug that needs to be resolvedhelp-neededAction needed: The help of the community would be appreciatedp4Important Issueprovider-localAn issue with the local provider

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions