Add global auth middleware and refresh token handling

This commit is contained in:
2025-08-08 19:52:43 +02:00
parent 43016fa5a9
commit 65e0c583cf
3 changed files with 39 additions and 9 deletions

View File

@@ -16,19 +16,20 @@ export default defineNuxtConfig({
signInResponseTokenPointer: "/access",
type: "JWT",
headerName: "Authorization",
maxAgeInSeconds: 60 * 30,
cookieName: "authls.atoken",
maxAgeInSeconds: 30 * 60,
},
refresh: {
isEnabled: true,
endpoint: { path: "/refresh", method: "post" },
refreshOnlyToken: true,
endpoint: { path: "/jwt/refresh/", method: "post" },
refreshOnlyToken: false,
token: {
signInResponseRefreshTokenPointer: "/refresh",
refreshResponseTokenPointer: "",
refreshResponseTokenPointer: "/access",
refreshRequestTokenPointer: "/refresh",
maxAgeInSeconds: 60 * 60 * 24,
cookieName: "authls.rtoken",
maxAgeInSeconds: 60 * 60 * 24,
sameSiteAttribute: "strict",
},
},
endpoints: {