MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / parseApprovedAuth

Function parseApprovedAuth

apps/extension/src/shared/auth.ts:129–140  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

127};
128
129const parseApprovedAuth = (value: unknown): StoredAuth => {
130 const parsed = storedAuthSchema.safeParse(value);
131
132 if (!parsed.success) {
133 throw new TypeError('Device auth poll response did not include a token.');
134 }
135
136 return {
137 token: parsed.data.token,
138 userEmail: parsed.data.userEmail,
139 };
140};
141
142export const createDeviceAuthRequest = async ({
143 apiBaseUrl,

Callers 1

pollDeviceAuthCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected