I suspect this is the "fault" of NuxtJS Auth, because remember_tokens are stored in the database. I don't know how to deal with it. I am always logged out after a few hours.
auth: {
strategies: {
'laravelSanctum': {
provider: 'laravel/sanctum',
url: 'https://api.mydomain.com',
endpoints: {
login: { url: '/auth/login', method: 'post' },
logout: { url: '/auth/logout', method: 'post' },
user: { url: '/auth/user', method: 'get' }
}
}
}
},
What can I do to fix it?
@edit
auth: {
cookie: {
prefix: 'auth.',
options: {
path: '/',
domain: process.env.COOKIES_DOMAIN,
expires: 365,
maxAge: 31536000000, // 365 days
secure: true,
}
},
strategies: {
'laravelSanctum': {
provider: 'laravel/sanctum',
url: process.env.API_URL,
endpoints: {
login: { url: '/auth/login', method: 'post' },
logout: { url: '/auth/logout', method: 'post' },
user: { url: '/auth/user', method: 'get' }
},
}
}
},
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…