fix: Use absolute path for auth0 callback
parent
b57d3dddcf
commit
0e0bebed4a
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue