From 0e0bebed4a9f61bc454b91fa6a4fc4d961630393 Mon Sep 17 00:00:00 2001 From: Bouncey Date: Wed, 13 Feb 2019 12:14:25 +0000 Subject: [PATCH] fix: Use absolute path for auth0 callback --- api-server/server/passport-providers.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api-server/server/passport-providers.js b/api-server/server/passport-providers.js index f157ed193f..1298a3d25e 100644 --- a/api-server/server/passport-providers.js +++ b/api-server/server/passport-providers.js @@ -1,10 +1,10 @@ import { auth0 } from '../../config/secrets'; -import { homeLocation } from '../../config/env'; +import { homeLocation, apiLocation } from '../../config/env'; const { clientID, clientSecret, domain } = auth0; const successRedirect = `${homeLocation}/welcome`; -const failureRedirect = '/signin'; +const failureRedirect = `${homeLocation}/signin`; export default { devlogin: { @@ -29,8 +29,8 @@ export default { clientID, clientSecret, domain, - cookieDomain: 'freeCodeCamp.org', - callbackURL: '/auth/auth0/callback', + cookieDomain: process.env.COOKIE_DOMAIN || 'localhost', + callbackURL: `${apiLocation}/auth/auth0/callback`, authPath: '/auth/auth0', callbackPath: '/auth/auth0/callback', useCustomCallback: true,