auth: remove refresh-session redirect on expired token — fall through instead

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Rokojori 2026-07-17 23:48:31 +02:00
parent 858e70f7bb
commit 9114e3376a
1 changed files with 1 additions and 9 deletions

View File

@ -23,17 +23,9 @@ app.use( ( req: Request, res: Response, next: NextFunction ) =>
next();
}
catch ( err )
{
if ( err instanceof jwt.TokenExpiredError )
{
const redirect = encodeURIComponent( req.protocol + '://' + req.get( 'host' ) + req.originalUrl );
res.redirect( `/api/auth/refresh-session?redirect=${redirect}` );
}
else
{
next();
}
}
} );
app.use( express.static( path.join( __dirname, '..', '..', 'build', 'app' ) ) );