-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
39 lines (35 loc) · 1 KB
/
nuxt.config.js
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
const isDeployed = (
process.env.AUTH_ORIGIN === 'http://localhost:3000'
|| !process.env.AUTH_ORIGIN
) ? false : true;
const deploymentDomain = process.env.AUTH_ORIGIN || 'http://localhost:3000';
export default defineNuxtConfig({
runtimeConfig: {
nextAuthSecret: process.env.NEXTAUTH_SECRET,
auth0ClientId: process.env.AUTH0_CLIENT_ID,
auth0ClientSecret: process.env.AUTH0_CLIENT_SECRET,
auth0Issuer: process.env.AUTH0_ISSUER,
public: {
isDeployed
}
},
modules: [
'@sidebase/nuxt-auth'
],
auth: {
provider: {
type: 'authjs',
addDefaultCallbackUrl: true
},
// https://sidebase.io/nuxt-auth/v0.6/configuration/nuxt-auth-handler#nuxtauthhandler
origin: deploymentDomain,
// https://sidebase.io/nuxt-auth/v0.6/configuration/nuxt-config#module-nuxtconfigts
baseUrl: `/api/auth`,
addDefaultCallbackUrl: true,
globalAppMiddleware: {
isEnabled: true,
allow404WithoutAuth: true,
addDefaultCallbackUrl: true
},
}
});