api-client/packages/hoppscotch-common/src/helpers/appLoginGate.ts
2026-05-06 09:22:55 +02:00

14 lines
321 B
TypeScript

type KernelMode = "web" | "desktop"
export type LoginGateState = {
platform: KernelMode
isAuthInitComplete: boolean
currentUser: unknown | null
}
export function shouldBlockAppForLogin(state: LoginGateState) {
return (
state.platform === "web" &&
(!state.isAuthInitComplete || !state.currentUser)
)
}