mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 23:26:30 +08:00
fix: revalidate user token with no refresh page (#1842)
This commit is contained in:
@@ -40,10 +40,11 @@ describe('AFFiNE workspace', () => {
|
||||
// but refresh is still valid
|
||||
refresh: data.refresh,
|
||||
});
|
||||
renderHook(() => useAffineRefreshAuthToken(1));
|
||||
const hook = renderHook(() => useAffineRefreshAuthToken(1));
|
||||
await new Promise(resolve => setTimeout(resolve, 3000));
|
||||
const userData = parseIdToken(getLoginStorage()?.token as string);
|
||||
expect(userData).not.toBeNull();
|
||||
expect(isExpired(userData)).toBe(false);
|
||||
hook.unmount();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user