-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmedusa-config.ts
More file actions
48 lines (46 loc) · 1.25 KB
/
medusa-config.ts
File metadata and controls
48 lines (46 loc) · 1.25 KB
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
import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils"
import { loadEnv, defineConfig } from "@medusajs/framework/utils"
loadEnv(process.env.NODE_ENV || "development", process.cwd())
export default defineConfig({
projectConfig: {
databaseUrl: process.env.DATABASE_URL,
http: {
storeCors: process.env.STORE_CORS || "http://localhost:8000",
adminCors: process.env.ADMIN_CORS || "http://localhost:9000",
authCors: process.env.AUTH_CORS || "http://localhost:8000,http://localhost:9000",
jwtSecret: process.env.JWT_SECRET || "supersecret",
cookieSecret: process.env.COOKIE_SECRET || "supersecret",
},
},
modules: [
{
resolve: "@medusajs/medusa/auth",
dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER],
options: {
providers: [
{
resolve: "@medusajs/medusa/auth-emailpass",
id: "emailpass",
},
{
resolve: "./src/providers/otp",
id: "otp",
},
],
},
},
],
plugins: [
{
resolve: ".",
options: {
digits: 6,
ttl: 300,
http: {
alwaysReturnSuccess: false,
warnOnError: true,
},
},
},
],
})