fix: Use absolute path for auth0 callback

pull/35209/head
Bouncey 2019-02-13 12:14:25 +00:00 committed by mrugesh mohapatra
parent b57d3dddcf
commit 0e0bebed4a
1 changed files with 4 additions and 4 deletions

View File

@ -1,10 +1,10 @@
import { auth0 } from '../../config/secrets'; import { auth0 } from '../../config/secrets';
import { homeLocation } from '../../config/env'; import { homeLocation, apiLocation } from '../../config/env';
const { clientID, clientSecret, domain } = auth0; const { clientID, clientSecret, domain } = auth0;
const successRedirect = `${homeLocation}/welcome`; const successRedirect = `${homeLocation}/welcome`;
const failureRedirect = '/signin'; const failureRedirect = `${homeLocation}/signin`;
export default { export default {
devlogin: { devlogin: {
@ -29,8 +29,8 @@ export default {
clientID, clientID,
clientSecret, clientSecret,
domain, domain,
cookieDomain: 'freeCodeCamp.org', cookieDomain: process.env.COOKIE_DOMAIN || 'localhost',
callbackURL: '/auth/auth0/callback', callbackURL: `${apiLocation}/auth/auth0/callback`,
authPath: '/auth/auth0', authPath: '/auth/auth0',
callbackPath: '/auth/auth0/callback', callbackPath: '/auth/auth0/callback',
useCustomCallback: true, useCustomCallback: true,