Skip to content

Commit a6974af

Browse files
committed
extra logging
1 parent e423429 commit a6974af

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/app/components/AuthSessionProvider.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,18 @@ export function AuthSessionProvider({
7474
email: user.email ?? null,
7575
isAuthenticated: !user.isAnonymous,
7676
});
77-
setUserCookieSession().catch(() => {});
77+
setUserCookieSession().catch(() => {
78+
console.error('Failed to establish session cookie');
79+
});
7880

7981
// Check every 5 minutes; the cookie lasts 60 minutes, so this ensures renewal well before expiry
8082
// If the cookie is not expired, it will return early and skip the POST
8183
// The token will refresh 5 minutes before expiry which is why the 5 minute interval is used here.
8284
intervalRef.current = setInterval(
8385
() => {
84-
setUserCookieSession().catch(() => {});
86+
setUserCookieSession().catch(() => {
87+
console.error('Failed to establish session cookie');
88+
});
8589
},
8690
5 * 60 * 1000,
8791
); // 5 minutes

0 commit comments

Comments
 (0)