Files
listas_frontend_nuxt/nuxt.config.ts
2025-08-06 18:11:13 +02:00

50 lines
1.4 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",
refresh: {
isEnabled: true,
endpoint: { path: "/refresh", method: "post" },
refreshOnlyToken: true,
token: {
signInResponseRefreshTokenPointer: "/refresh",
refreshResponseTokenPointer: "",
refreshRequestTokenPointer: "/refresh",
maxAgeInSeconds: 60 * 60 * 24,
},
},
endpoints: {
signIn: { path: "/jwt/create/", method: "post" },
signOut: false,
signUp: { path: "/users/", method: "post" },
getSession: { path: "/users/me/", method: "get" },
},
pages: {
login: "/login",
},
token: {
signInResponseTokenPointer: "/access",
type: "JWT",
headerName: "Authorization",
maxAgeInSeconds: 60 * 30,
},
sessionDataType: {},
},
enableSessionRefreshPeriodically: 5000,
enableSessionRefreshOnWindowFocus: true,
},
css: ["vuetify/styles", "@mdi/font/css/materialdesignicons.min.css"],
plugins: ["~/plugins/vuetify.js"],
components: true,
});