The commit message contains only the subject line since the change is straightforward - configuring authentication token settings and cookie names for both access and refresh tokens.
53 lines
1.5 KiB
TypeScript
53 lines
1.5 KiB
TypeScript
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
export default defineNuxtConfig({
|
|
compatibilityDate: "2025-07-15",
|
|
ssr: false,
|
|
devtools: { enabled: false },
|
|
modules: ["@pinia/nuxt", "@sidebase/nuxt-auth"],
|
|
runtimeConfig: {
|
|
baseURL: "http://localhost:3000",
|
|
},
|
|
auth: {
|
|
globalAppMiddleware: true,
|
|
baseURL: "http://localhost:8000/auth",
|
|
provider: {
|
|
type: "local",
|
|
token: {
|
|
signInResponseTokenPointer: "/access",
|
|
type: "JWT",
|
|
headerName: "Authorization",
|
|
maxAgeInSeconds: 60 * 30,
|
|
cookieName: "authls.atoken",
|
|
},
|
|
refresh: {
|
|
isEnabled: true,
|
|
endpoint: { path: "/refresh", method: "post" },
|
|
refreshOnlyToken: true,
|
|
token: {
|
|
signInResponseRefreshTokenPointer: "/refresh",
|
|
refreshResponseTokenPointer: "",
|
|
refreshRequestTokenPointer: "/refresh",
|
|
maxAgeInSeconds: 60 * 60 * 24,
|
|
cookieName: "authls.rtoken",
|
|
},
|
|
},
|
|
endpoints: {
|
|
signIn: { path: "/jwt/create/", method: "post" },
|
|
signOut: false,
|
|
signUp: { path: "/users/", method: "post" },
|
|
getSession: { path: "/users/me/", method: "get" },
|
|
},
|
|
pages: {
|
|
login: "/login",
|
|
},
|
|
|
|
sessionDataType: {},
|
|
},
|
|
enableSessionRefreshPeriodically: 5000,
|
|
enableSessionRefreshOnWindowFocus: true,
|
|
},
|
|
css: ["vuetify/styles", "@mdi/font/css/materialdesignicons.min.css"],
|
|
plugins: ["~/plugins/vuetify.js"],
|
|
components: true,
|
|
});
|