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:
@@ -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 +1,2 @@
|
||||
export * from "./abstract-auth-provider"
|
||||
export * from "./token"
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user