1234567891011121314151617 |
- const jwt = require('jsonwebtoken');
- const config = require("../configs/config.json");
- exports.createToken = function (login_id) {
- return new Promise((result, reject) => {
- const token = jwt.sign(
- { login_id: login_id },
- config.token_header_key,
- {
- expiresIn: "2h",
- }
- );
- result(token);
- });
- }
-
|