Hi Guys,
I’m using strapi nuxt integration for user login. I"m able to login, and cookie gets set with no expiry time/date. When the page reloads, the cookie gets deleted. I have tried several different approaches, but no dice. The link below to git shows my attempted setup. Any ideas?
I have also tried updating strapi and nuxt with no luck.
opened 11:55PM - 04 Jan 24 UTC
bug
On user login, the cookie gets set. However, on page refresh the cookie is delet… ed. Also, the expiry doesn't appear be to taking place. This is my nuxt.config. Any ideas.
On the following post they suggested upgrading strapi and nuxt, which i've tried, with the same outcome - https://github.com/nuxt-modules/strapi/pull/354
### Version
@nuxtjs/strapi: 4.13.6
nuxt: 3.7.4
```
runtimeConfig: {
strapi: {
url: 'https://login.7da2-202-129-81-163.ngrok-free.app',
prefix: '/api',
version: 'v4',
cookie: {
path: '/',
maxAge: 60 * 60 * 24 * 30, // 30days login time
},
cookieName: 'strapi_jwt',
},
```
I have also tried setting manually after login, but no luck -
```
const { login } = useStrapiAuth()
try {
const response = await login({ identifier: identifier, password: password })
await useCookie('strapi_jwt', {
maxAge: 60 * 60 * 24 * 7,
path: '/'
})
return response
} catch (e) {
throw e
}
```
Cheers in advance.
Please note, i have also tested the following on my middlewares.js
{
name: 'strapi::session',
config: {
rolling: true,
renew: true,
httpOnly: true,
maxAge: 86400000
},
},