UNPKG

@perfood/couch-auth

Version:

Easy and secure authentication for CouchDB/Cloudant. Based on SuperLogin, updated and rewritten in Typescript.

79 lines (78 loc) 2.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultConfig = void 0; const path_1 = require("path"); /** * These are the default settings that will be used if you don't override them * in your config */ exports.defaultConfig = { security: { defaultRoles: ['user'], sessionLife: 86400, tokenLife: 86400, loginOnRegistration: false, loginOnPasswordReset: false, disabledRoutes: [ 'validate-username', 'validate-email', 'unlink', 'session', 'forgot-username' ], forwardErrors: false }, local: { passwordConstraints: { presence: true, length: { minimum: 8, message: 'must be at least 8 characters' }, matches: 'confirmPassword' }, usernameField: 'username', passwordField: 'password', emailUsername: true, emailLogin: true, keepEmailConfirmToken: false, usernameLogin: false, uuidLogin: false, requireEmailConfirm: true, sendConfirmEmail: true, requirePasswordOnEmailChange: true, sendPasswordChangedEmail: true, sendExistingUserEmail: true, }, dbServer: { protocol: 'http://', host: 'localhost:5984', designDocDir: (0, path_1.join)(__dirname, '/designDocs'), userDB: 'sl_users', couchAuthDB: '_users' }, emailTemplates: { folder: (0, path_1.join)(__dirname, './../../templates/email'), data: { year: new Date().getFullYear() }, templates: { confirmEmail: { subject: 'Please confirm your email' }, confirmEmailChange: { subject: 'Please confirm your new email' }, forgotPassword: { subject: 'Your password reset link' }, modifiedPassword: { subject: 'Your password has been modified' }, signupExistingEmail: { subject: 'You already have registered with us' }, forgotUsername: { subject: 'Your username request' } } } };