MCPcopy Index your code
hub / github.com/MatterAIOrg/OrbCode / verifyToken

Function verifyToken

src/auth/auth.ts:251–256  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

249
250/** Validate a pasted token: well-formed JWT + accepted by the profile endpoint. */
251export async function verifyToken(token: string): Promise<ProfileData> {
252 if (token.split(".").length !== 3) {
253 throw new Error("That doesn't look like a valid token (expected a JWT).");
254 }
255 return fetchProfile(token);
256}

Callers 1

finishWithTokenFunction · 0.85

Calls 1

fetchProfileFunction · 0.85

Tested by

no test coverage detected