Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}),
proxy: true,
resave: false,
saveUninitialized: false,
})
);
router.use(passport.initialize());
router.use(passport.session());
passport.serializeUser((user: any, done: Function) => done(null, user));
passport.deserializeUser((sessionUser: any, done: Function) =>
done(null, sessionUser)
);
if (DOMAIN) {
Auth0Strategy.prototype.authorizationParams = function(options: any) {
var options = options || {};
const params: any = {};
if (options.connection && typeof options.connection === 'string') {
params.connection = options.connection;
}
if (options.audience && typeof options.audience === 'string') {
params.audience = options.audience;
}
params.account_verification = true;
return params;
};
const strategy = new Auth0Strategy(
{