feat: Remove returning token from customer and user endpoints (#7523)

* chore: Move generateJwtToken to utils

* feat: Stop returning token on user and customer endpoints
This commit is contained in:
Stevche Radevski
2024-05-29 17:13:01 +02:00
committed by GitHub
parent e5e5eb6e18
commit aeda24265d
14 changed files with 32 additions and 64 deletions
+1
View File
@@ -37,6 +37,7 @@
"awilix": "^8.0.1",
"bignumber.js": "^9.1.2",
"dotenv": "^16.4.5",
"jsonwebtoken": "^9.0.2",
"knex": "2.4.2",
"ulid": "^2.3.0"
},
+1
View File
@@ -1 +1,2 @@
export * from "./abstract-auth-provider"
export * from "./token"
+13
View File
@@ -0,0 +1,13 @@
import jwt from "jsonwebtoken"
export const generateJwtToken = (
tokenPayload: Record<string, unknown>,
jwtConfig: {
secret: string
expiresIn: string
}
) => {
return jwt.sign(tokenPayload, jwtConfig.secret, {
expiresIn: jwtConfig.expiresIn,
})
}