Fix cookie secure flag for HTTP testing and add Pinia store
This commit is contained in:
@@ -54,7 +54,7 @@ export default defineEventHandler(async (event) => {
|
||||
// Set cookie
|
||||
setCookie(event, 'auth_token', token, {
|
||||
httpOnly: true,
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
secure: false, // Auch in Production false, da wir HTTPS über Apache terminieren
|
||||
sameSite: 'lax',
|
||||
maxAge: 60 * 60 * 24 * 7 // 7 days
|
||||
})
|
||||
|
||||
@@ -54,5 +54,26 @@
|
||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEiLCJlbWFpbCI6ImFkbWluQGhhcmhlaW1lcnRjLmRlIiwicm9sZSI6ImFkbWluIiwiaWF0IjoxNzYxMDQ5MDQ0LCJleHAiOjE3NjE2NTM4NDR9.fhaWO80YN8qKy9zBCK5nauGWBT29hmr3KxAK_Vlab4E",
|
||||
"createdAt": "2025-10-21T12:17:24.973Z",
|
||||
"expiresAt": "2025-10-28T12:17:24.973Z"
|
||||
},
|
||||
{
|
||||
"id": "1761049329180",
|
||||
"userId": "1",
|
||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEiLCJlbWFpbCI6ImFkbWluQGhhcmhlaW1lcnRjLmRlIiwicm9sZSI6ImFkbWluIiwiaWF0IjoxNzYxMDQ5MzI5LCJleHAiOjE3NjE2NTQxMjl9.UauragKTqlFMdy7_sZekrLPVM8tlN9NhRjqmCTWM0_8",
|
||||
"createdAt": "2025-10-21T12:22:09.180Z",
|
||||
"expiresAt": "2025-10-28T12:22:09.180Z"
|
||||
},
|
||||
{
|
||||
"id": "1761049400726",
|
||||
"userId": "1",
|
||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEiLCJlbWFpbCI6ImFkbWluQGhhcmhlaW1lcnRjLmRlIiwicm9sZSI6ImFkbWluIiwiaWF0IjoxNzYxMDQ5NDAwLCJleHAiOjE3NjE2NTQyMDB9._E8-T3_WXsu7RSlrg6GUbxFncUmombaybN1-_UpZbNA",
|
||||
"createdAt": "2025-10-21T12:23:20.726Z",
|
||||
"expiresAt": "2025-10-28T12:23:20.726Z"
|
||||
},
|
||||
{
|
||||
"id": "1761049449140",
|
||||
"userId": "1",
|
||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEiLCJlbWFpbCI6ImFkbWluQGhhcmhlaW1lcnRjLmRlIiwicm9sZSI6ImFkbWluIiwiaWF0IjoxNzYxMDQ5NDQ5LCJleHAiOjE3NjE2NTQyNDl9.hCs7tx4v2wWLwD7CkWho6YI7oTYWrZwrgmAgfA1EupM",
|
||||
"createdAt": "2025-10-21T12:24:09.140Z",
|
||||
"expiresAt": "2025-10-28T12:24:09.140Z"
|
||||
}
|
||||
]
|
||||
@@ -8,6 +8,6 @@
|
||||
"phone": "",
|
||||
"active": true,
|
||||
"created": "2025-10-21T00:00:00.000Z",
|
||||
"lastLogin": "2025-10-21T12:17:24.973Z"
|
||||
"lastLogin": "2025-10-21T12:24:09.140Z"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user