MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / accessTokenFromLocation

Function accessTokenFromLocation

packages/client/src/api/client.ts:14–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12}
13
14export function accessTokenFromLocation(): string {
15 if (typeof window === "undefined") {
16 return "";
17 }
18 return new URLSearchParams(window.location.search).get("simdeckToken") ?? "";
19}
20
21export function apiHeaders(headers: HeadersInit = {}): HeadersInit {
22 const token = accessTokenFromLocation();

Callers 7

webSocketApiUrlFunction · 0.90
AppShellFunction · 0.90
apiHeadersFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected