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:
@@ -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