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