Fix session token expiry
This commit is contained in:
parent
b7279f57d1
commit
a8ae173914
1 changed files with 2 additions and 2 deletions
|
|
@ -106,7 +106,7 @@ export default defineEventHandler(async (event) => {
|
||||||
helcimCustomerId: customerData.id
|
helcimCustomerId: customerData.id
|
||||||
},
|
},
|
||||||
config.jwtSecret,
|
config.jwtSecret,
|
||||||
{ expiresIn: '24h' }
|
{ expiresIn: '7d' }
|
||||||
)
|
)
|
||||||
|
|
||||||
// Set the session cookie server-side
|
// Set the session cookie server-side
|
||||||
|
|
@ -114,7 +114,7 @@ export default defineEventHandler(async (event) => {
|
||||||
httpOnly: true,
|
httpOnly: true,
|
||||||
secure: process.env.NODE_ENV === 'production',
|
secure: process.env.NODE_ENV === 'production',
|
||||||
sameSite: 'lax',
|
sameSite: 'lax',
|
||||||
maxAge: 60 * 60 * 24, // 24 hours
|
maxAge: 60 * 60 * 24 * 7, // 7 days (matches verify.get.js and refresh.post.js)
|
||||||
path: '/',
|
path: '/',
|
||||||
domain: undefined // Let browser set domain automatically
|
domain: undefined // Let browser set domain automatically
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue