diff --git a/packages/hoppscotch-common/src/platform/auth.ts b/packages/hoppscotch-common/src/platform/auth.ts index 152ba63f..585afb76 100644 --- a/packages/hoppscotch-common/src/platform/auth.ts +++ b/packages/hoppscotch-common/src/platform/auth.ts @@ -38,6 +38,7 @@ export type AuthEvent = | { event: "probable_login"; user: HoppUser } // We have previous login state, but the app is waiting for authentication | { event: "login"; user: HoppUser } // We are authenticated | { event: "logout" } // No authentication and we have no previous state + | { event: "token_refresh"; user: HoppUser } // We have refreshed our tokens and have new ones now export type GithubSignInResult = | { type: "success"; user: HoppUser } // The authentication was a success diff --git a/packages/hoppscotch-selfhost-web/src/lib/sync/index.ts b/packages/hoppscotch-selfhost-web/src/lib/sync/index.ts index 3581daf4..812093ea 100644 --- a/packages/hoppscotch-selfhost-web/src/lib/sync/index.ts +++ b/packages/hoppscotch-selfhost-web/src/lib/sync/index.ts @@ -22,8 +22,11 @@ let _isRunningDispatchWithoutSyncing = true export function runDispatchWithOutSyncing(func: () => void) { _isRunningDispatchWithoutSyncing = false - func() - _isRunningDispatchWithoutSyncing = true + try { + func() + } finally { + _isRunningDispatchWithoutSyncing = true + } } export const getSyncInitFunction = >(