UNPKG

@fran-834/gs-microservice-core

Version:

Core package for Node.js microservices by Galduria Software. Includes security, logging, validation, and error handling middlewares.

18 lines (17 loc) 400 B
let authSecret = ""; /** * Sets the authentication secret used for JWT verification. */ const setAuthSecret = (secret) => { authSecret = secret; }; /** * Gets the authentication secret used for JWT verification. */ const getAuthSecret = () => { if (!authSecret) { throw new Error("Auth secret is not set"); } return authSecret; }; export { setAuthSecret, getAuthSecret };