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(
|
||||
config.app.urlClient +
|
||||
'/applaunch?redirect=' +
|
||||
encodeURIComponent(redirectUri) +
|
||||
'&redirectType=' +
|
||||
redirectType
|
||||
);
|
||||
if (redirectType === 'web') {
|
||||
res.redirect(redirectUri);
|
||||
} else {
|
||||
res.redirect(
|
||||
config.app.urlClient +
|
||||
'/applaunch?redirect=' +
|
||||
encodeURIComponent(redirectUri) +
|
||||
'&redirectType=' +
|
||||
redirectType
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const createOrUpdateUser = async (userInfo) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user