@vs-org/authenticator
Version:
VS authenticator package can generate TOTP (RFC6238) for 2FA, and also provide secret and recovery codes for 2FA setup
23 lines (22 loc) • 604 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var TimeUtils = /** @class */ (function () {
function TimeUtils() {
}
/**
*
* @returns {string} - returns UTC time string
*/
TimeUtils.getCurrentUTCTime = function () {
return new Date().toUTCString();
};
/**
*
* @returns {number} - returns seconds passed from 1st Jan 1970 in UTC
*/
TimeUtils.getCurrentUTCTimeInSeconds = function () {
return Date.parse(new Date().toUTCString()) / 1000;
};
return TimeUtils;
}());
exports.default = TimeUtils;