Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*/
const LOCAL_STRATEGY_CONFIG = {
usernameField: 'email',
passwordField: 'password',
session: false,
passReqToCallback: true
};
/**
* Configuration object for JWT strategy
* @type {Object}
* @private
*/
const JWT_STRATEGY_CONFIG = {
secretOrKey: '<%= options["secret-key"] %>',
jwtFromRequest: ExtractJwt.versionOneCompatibility({authScheme: 'Bearer', tokenBodyField: 'access_token'}),
tokenQueryParameterName: 'access_token',
session: false,
passReqToCallback: true
};
/**
* Configuration object for social strategies
* @type {Object}
* @private
*/
const SOCIAL_STRATEGY_CONFIG = {
clientID: '-',
clientSecret: '-',
consumerKey: '-',
consumerSecret: '-',
passReqToCallback: true
'use strict'
const { ExtractJwt } = require('passport-jwt')
const YAML = require('yamljs')
const secretOrKey = YAML.load('config/settings.yaml').jwt.secretOrKey
const params = {
secretOrKey,
jwtFromRequest: ExtractJwt.versionOneCompatibility({authScheme: 'Bearer'})
}
module.exports = params