feat: Destroy session + introduce http config (#7336)
This commit is contained in:
@@ -34,7 +34,7 @@ medusaIntegrationTestRunner({
|
||||
const authService: IAuthModuleService = appContainer.resolve(
|
||||
ModuleRegistrationName.AUTH
|
||||
)
|
||||
const { jwt_secret } =
|
||||
const { http } =
|
||||
appContainer.resolve("configModule").projectConfig
|
||||
const authUser = await authService.create({
|
||||
entity_id: "store_user",
|
||||
@@ -42,7 +42,7 @@ medusaIntegrationTestRunner({
|
||||
scope: "store",
|
||||
})
|
||||
|
||||
const token = jwt.sign(authUser, jwt_secret)
|
||||
const token = jwt.sign(authUser, http.jwtSecret)
|
||||
|
||||
const response = await api.post(
|
||||
`/store/customers`,
|
||||
|
||||
@@ -7,7 +7,7 @@ export const createAuthenticatedCustomer = async (
|
||||
appContainer: MedusaContainer,
|
||||
customerData: Partial<CreateCustomerDTO> = {}
|
||||
) => {
|
||||
const { jwt_secret } = appContainer.resolve("configModule").projectConfig
|
||||
const { http } = appContainer.resolve("configModule").projectConfig
|
||||
const authService = appContainer.resolve(ModuleRegistrationName.AUTH)
|
||||
const customerModuleService = appContainer.resolve(
|
||||
ModuleRegistrationName.CUSTOMER
|
||||
@@ -27,7 +27,7 @@ export const createAuthenticatedCustomer = async (
|
||||
app_metadata: { customer_id: customer.id },
|
||||
})
|
||||
|
||||
const token = jwt.sign(authUser, jwt_secret)
|
||||
const token = jwt.sign(authUser, http.jwtSecret)
|
||||
|
||||
return { customer, authUser, jwt: token }
|
||||
}
|
||||
|
||||
@@ -38,8 +38,10 @@ module.exports = {
|
||||
projectConfig: {
|
||||
database_url: DB_URL,
|
||||
database_type: "postgres",
|
||||
jwt_secret: "test",
|
||||
cookie_secret: "test",
|
||||
http: {
|
||||
jwtSecret: "test",
|
||||
cookieSecret: "test",
|
||||
},
|
||||
},
|
||||
featureFlags: {
|
||||
medusa_v2: enableMedusaV2,
|
||||
|
||||
Reference in New Issue
Block a user