Files
freeCodeCamp/api-server/server/passport-providers.js

33 lines
877 B
JavaScript
Raw Normal View History

2018-05-19 21:21:49 +05:30
const successRedirect = '/';
const failureRedirect = '/';
export default {
2015-06-04 10:52:12 -07:00
local: {
provider: 'local',
module: 'passport-local',
usernameField: 'email',
passwordField: 'password',
authPath: '/auth/local',
successRedirect: successRedirect,
failureRedirect: failureRedirect,
2015-06-09 17:22:14 -07:00
session: true,
2015-06-04 10:52:12 -07:00
failureFlash: true
},
'auth0-login': {
provider: 'auth0',
module: 'passport-auth0',
clientID: process.env.AUTH0_CLIENT_ID,
clientSecret: process.env.AUTH0_CLIENT_SECRET,
domain: process.env.AUTH0_DOMAIN,
2018-05-19 14:09:27 +05:30
cookieDomain: 'freeCodeCamp.org',
callbackURL: '/auth/auth0/callback',
authPath: '/auth/auth0',
callbackPath: '/auth/auth0/callback',
2018-05-20 13:40:15 +05:30
useCustomCallback: true,
successRedirect: successRedirect,
failureRedirect: failureRedirect,
scope: ['openid profile email'],
failureFlash: true
2015-06-04 10:52:12 -07:00
}
};