fix(auth): redirect to learn after sign in (#37114)
This commit is contained in:
committed by
Ahmad Abdolsaheb
parent
23a3287d8f
commit
20ca046a2a
@ -180,7 +180,7 @@ function createGetPasswordlessAuth(app) {
|
|||||||
'success',
|
'success',
|
||||||
'Success! You have signed in to your account. Happy Coding!'
|
'Success! You have signed in to your account. Happy Coding!'
|
||||||
);
|
);
|
||||||
return res.redirectWithFlash(`${homeLocation}`);
|
return res.redirectWithFlash(`${homeLocation}/learn`);
|
||||||
})
|
})
|
||||||
.subscribe(() => {}, next)
|
.subscribe(() => {}, next)
|
||||||
);
|
);
|
||||||
|
@ -112,7 +112,7 @@ export const createPassportCallbackAuthenticator = (strategy, config) => (
|
|||||||
if (!user || !userInfo) {
|
if (!user || !userInfo) {
|
||||||
return res.redirect('/signin');
|
return res.redirect('/signin');
|
||||||
}
|
}
|
||||||
const redirect = `${homeLocation}/`;
|
const redirect = `${homeLocation}/learn`;
|
||||||
|
|
||||||
const { accessToken } = userInfo;
|
const { accessToken } = userInfo;
|
||||||
const { provider } = config;
|
const { provider } = config;
|
||||||
|
@ -3,7 +3,7 @@ import { homeLocation, apiLocation } from '../../config/env';
|
|||||||
|
|
||||||
const { clientID, clientSecret, domain } = auth0;
|
const { clientID, clientSecret, domain } = auth0;
|
||||||
|
|
||||||
const successRedirect = `${homeLocation}/`;
|
const successRedirect = `${homeLocation}/learn`;
|
||||||
const failureRedirect = `${homeLocation}/signin`;
|
const failureRedirect = `${homeLocation}/signin`;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
Reference in New Issue
Block a user