mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
fix: catch refresh token error
This commit is contained in:
@@ -172,7 +172,10 @@ export const AppStateProvider = ({ children }: { children?: ReactNode }) => {
|
||||
}));
|
||||
};
|
||||
token.onChange(callback);
|
||||
token.refreshToken();
|
||||
token.refreshToken().catch(err => {
|
||||
// FIXME: should resolve invalid refresh token
|
||||
console.log(err);
|
||||
});
|
||||
return () => {
|
||||
token.offChange(callback);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user