MCPcopy Create free account
hub / github.com/hashintel/hash / isLoggedIn

Function isLoggedIn

apps/plugin-browser/src/scripts/background/infer-entities.ts:41–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39};
40
41const isLoggedIn = async (): Promise<boolean> => {
42 const cookies = await browser.cookies.getAll({
43 url: await getApiOriginUrl(),
44 name: "ory_kratos_session",
45 });
46 return cookies.length > 0;
47};
48
49/** Build the cookie header for WebSocket requests (needs both CSRF and session). */
50const buildWebsocketCookieString = async () => {

Callers 2

reconnectWebSocketFunction · 0.85
initFunction · 0.85

Calls 1

getApiOriginUrlFunction · 0.85

Tested by

no test coverage detected