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 )
|
catch ( err )
|
||||||
{
|
{
|
||||||
if ( err instanceof jwt.TokenExpiredError )
|
next();
|
||||||
{
|
|
||||||
const redirect = encodeURIComponent( req.protocol + '://' + req.get( 'host' ) + req.originalUrl );
|
|
||||||
res.redirect( `/api/auth/refresh-session?redirect=${redirect}` );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
next();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue