Skip to content

Commit

Permalink
Call refresh OBO endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
cskrov committed Sep 11, 2024
1 parent 3512b2c commit 85ddbce
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/src/components/smart-editor/tabbed-editors/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,16 @@ const EditorWithNewCommentAndFloatingToolbar = ({ id }: { id: string }) => {

useEffect(() => {
console.log('isConnected', isConnected);

const interval = setInterval(() => {
try {
fetch('/refresh-obo-access-token/kabal-api');
} catch (e) {
console.warn('Failed to refresh OBO token.', e);
}
}, 10_000);

return () => clearInterval(interval);
}, [isConnected]);

useEffect(() => {
Expand Down

0 comments on commit 85ddbce

Please sign in to comment.