Refactored login callback route handler to differentiate redirect behavior based on the redirect type, improving flexibility in response handling.
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
This commit is contained in:
parent
efb3fdbcb9
commit
759aa1017f
@ -232,13 +232,17 @@ export const loginCallbackRouteHandler = async (req, res, redirectType = 'web')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
res.redirect(
|
if (redirectType === 'web') {
|
||||||
config.app.urlClient +
|
res.redirect(redirectUri);
|
||||||
'/applaunch?redirect=' +
|
} else {
|
||||||
encodeURIComponent(redirectUri) +
|
res.redirect(
|
||||||
'&redirectType=' +
|
config.app.urlClient +
|
||||||
redirectType
|
'/applaunch?redirect=' +
|
||||||
);
|
encodeURIComponent(redirectUri) +
|
||||||
|
'&redirectType=' +
|
||||||
|
redirectType
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const createOrUpdateUser = async (userInfo) => {
|
const createOrUpdateUser = async (userInfo) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user