@bitwild/rockets-auth
Version:
Rockets Auth - Complete authentication and authorization solution for NestJS with JWT, OAuth, OTP, role-based access control, and more
34 lines • 1.43 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.rocketsAuthOptionsDefaultConfig = void 0;
const config_1 = require("@nestjs/config");
const rockets_auth_constants_1 = require("../constants/rockets-auth.constants");
exports.rocketsAuthOptionsDefaultConfig = (0, config_1.registerAs)(rockets_auth_constants_1.ROCKETS_AUTH_MODULE_OPTIONS_DEFAULT_SETTINGS_TOKEN, () => {
var _a, _b, _c, _d;
return {
role: {
adminRoleName: (_b = (_a = process.env) === null || _a === void 0 ? void 0 : _a.ADMIN_ROLE_NAME) !== null && _b !== void 0 ? _b : 'admin',
defaultUserRoleName: (_d = (_c = process.env) === null || _c === void 0 ? void 0 : _c.DEFAULT_USER_ROLE_NAME) !== null && _d !== void 0 ? _d : 'user',
},
email: {
from: 'from',
baseUrl: 'baseUrl',
tokenUrlFormatter: (baseUrl, passcode) => {
return `${baseUrl}/${passcode}`;
},
templates: {
sendOtp: {
fileName: __dirname + '/../assets/send-otp.template.hbs',
subject: 'Your One Time Password',
},
},
},
otp: {
assignment: 'userOtp',
category: 'auth-login',
type: 'uuid',
expiresIn: '1h',
},
};
});
//# sourceMappingURL=rockets-auth-options-default.config.js.map