} catch (error) {
if (error == 'Error: No refresh token is set.') {
// silent login if refresh token not present
// TODO this should be caught/handled in Auth.authorize, not here
req.session.redirect = req.url.replace(`https://${req.host}`, '');
res.redirect(Auth.authUrl);
} else {
req.session.redirect \= req.url.replace(`https://$\{req\.host}`, '');
https://github.com/groton-school/knowledgebase/blob/8f2f2cf310aa1beb23977286c6176fcebfb9b634/apps/router/src/Handlers/Factories/CloudStorageRouter.ts#L105