Token-Cookie pfadunabhängig speichern

This commit is contained in:
2026-06-02 11:54:18 +02:00
parent 8d821a6802
commit 79d620d9c1
3 changed files with 29 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ export default defineNuxtPlugin(() => {
credentials: "include",
async onRequest({ options }) {
const token = useCookie("token").value
const token = useCookie<string | null>("token", { path: "/" }).value
// Falls im Request explizit ein anderer JWT übergeben wird
if (options.context?.jwt) {