-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathnuxt.config.ts
74 lines (70 loc) · 1.77 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
export default defineNuxtConfig({
app: {
baseURL: '/openid/',
head: {
title: 'OIDC',
link: [
{
rel: 'stylesheet',
href: 'https://unpkg.com/@picocss/pico@latest/css/pico.min.css'
}
]
}
},
modules: [
'nuxt-openid-connect'
],
runtimeConfig: {
openidConnect: {
op: {
issuer: '',
clientId: '',
clientSecret: '',
callbackUrl: ''
},
config: {
cookieFlags: {
access_token: {
httpOnly: true,
secure: false
}
}
}
}
},
openidConnect: {
addPlugin: true,
op: {
issuer: 'http://localhost:8080/realms/test', // change to your OP addrress
clientId: 'testClient',
clientSecret: 'cnuLA78epx8s8vMbRxcaiXbzlS4u8bSA',
callbackUrl: 'http://localhost:3000/oidc/callback', // optional
scope: [
'email',
'profile',
'address'
]
},
config: {
debug: true,
response_type: 'code',
secret: 'oidc._sessionid',
isCookieUserInfo: false, // whether save userinfo into cookie.
cookie: { loginName: '' },
cookiePrefix: 'oidc._',
cookieEncrypt: true,
cookieEncryptKey: 'bfnuxt9c2470cb477d907b1e0917oidc',
cookieEncryptIV: 'ab83667c72eec9e4',
cookieEncryptALGO: 'aes-256-cbc',
cookieMaxAge: 24 * 60 * 60, // default one day
hasCookieRefreshExpireDate: false, // Set this to true if your provider has an refresh_expires_in date for the refresh token
cookieRefreshDefaultMaxAge: 24 * 60 * 60, // default one day if the hasCookieRefreshExpireDate is false
cookieFlags: {
access_token: {
httpOnly: true,
secure: false
}
}
}
}
})