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:
parent
858e70f7bb
commit
9114e3376a
|
|
@ -24,15 +24,7 @@ app.use( ( req: Request, res: Response, next: NextFunction ) =>
|
|||
}
|
||||
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();
|
||||
}
|
||||
next();
|
||||
}
|
||||
} );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue