Skip to content

Commit 9a93d40

Browse files
committed
fix issue with multiple refresh tokens in browser, remove network interface speed from modal
1 parent a694de5 commit 9a93d40

File tree

2 files changed

+4
-26
lines changed

2 files changed

+4
-26
lines changed

backend/src/routes/auth.route.ts

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ authRoute.post('/login', async (req: Request, res: Response) => {
175175
res.cookie('refresh_token', refreshToken, {
176176
httpOnly: true,
177177
secure: false,
178-
sameSite: 'strict',
179-
path: '/api/auth/refresh', // Restrict refresh token to auth refresh route
178+
sameSite: 'lax',
179+
path: '/',
180180
maxAge: 7 * 24 * 60 * 60 * 1000 // 7 days in milliseconds
181181
});
182182

@@ -237,13 +237,6 @@ authRoute.post('/refresh', async (req: Request, res: Response) => {
237237
path: '/'
238238
});
239239

240-
res.clearCookie('refresh_token', {
241-
httpOnly: true,
242-
secure: false,
243-
sameSite: 'strict',
244-
path: '/api/auth/refresh'
245-
});
246-
247240
res.clearCookie('refresh_token', {
248241
httpOnly: true,
249242
secure: false,
@@ -301,13 +294,6 @@ authRoute.post('/refresh', async (req: Request, res: Response) => {
301294
path: '/'
302295
});
303296

304-
res.clearCookie('refresh_token', {
305-
httpOnly: true,
306-
secure: false,
307-
sameSite: 'strict',
308-
path: '/api/auth/refresh'
309-
});
310-
311297
res.clearCookie('refresh_token', {
312298
httpOnly: true,
313299
secure: false,
@@ -409,14 +395,6 @@ authRoute.post('/logout', (req: Request, res: Response) => {
409395
path: '/'
410396
});
411397

412-
res.clearCookie('refresh_token', {
413-
httpOnly: true,
414-
secure: false,
415-
sameSite: 'strict',
416-
path: '/api/auth/refresh'
417-
});
418-
419-
// Also clear the refresh_token cookie with the updated path from the refresh route
420398
res.clearCookie('refresh_token', {
421399
httpOnly: true,
422400
secure: false,

frontend/src/components/dashboard/base-items/widgets/SystemMonitorWidget/SystemMonitorWidget.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,9 @@ export const SystemMonitorWidget = ({ config }: SystemMonitorWidgetProps) => {
363363
{systemInformation?.network && (
364364
<>
365365
<Typography><b>Network Interface:</b> {systemInformation.network.iface}</Typography>
366-
<Typography>
366+
{/* <Typography>
367367
<b>Interface Speed:</b> {systemInformation.network.speed || 1000} Mbps
368-
</Typography>
368+
</Typography> */}
369369
<Typography>
370370
<b>Upload Speed:</b> {formatNetworkSpeed(systemInformation.network.tx_sec).value} {formatNetworkSpeed(systemInformation.network.tx_sec).unit}
371371
</Typography>

0 commit comments

Comments
 (0)