forked from sidebase/nuxt-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
31 lines (30 loc) · 942 Bytes
/
nuxt.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export default defineNuxtConfig({
modules: ['../src/module.ts'],
build: {
transpile: ['jsonwebtoken']
},
auth: {
provider: {
type: 'local',
endpoints: {
getSession: { path: '/user' }
},
pages: {
login: '/'
},
token: {
signInResponseTokenPointer: '/token/accessToken'
},
sessionDataType: { id: 'string', email: 'string', name: 'string', role: 'admin | guest | account', subscriptions: "{ id: number, status: 'ACTIVE' | 'INACTIVE' }[]" }
},
session: {
// Whether to refresh the session every time the browser window is refocused.
enableRefreshOnWindowFocus: true,
// Whether to refresh the session every `X` milliseconds. Set this to `false` to turn it off. The session will only be refreshed if a session already exists.
enableRefreshPeriodically: 5000
},
globalAppMiddleware: {
isEnabled: true
}
}
})