MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / serializeOAuth

Function serializeOAuth

packages/cli/src/auth/store.ts:429–437  ·  view source on GitHub ↗
(o: OAuthTokens)

Source from the content-addressed store, hash-verified

427}
428
429function serializeOAuth(o: OAuthTokens): Record<string, unknown> {
430 const oauth: Record<string, unknown> = { ...(o[UNKNOWN] ?? {}) };
431 oauth["access_token"] = o.access_token;
432 if (o.refresh_token) oauth["refresh_token"] = o.refresh_token;
433 if (o.expires_at) oauth["expires_at"] = o.expires_at;
434 if (o.scope) oauth["scope"] = o.scope;
435 if (o.token_type) oauth["token_type"] = o.token_type;
436 return oauth;
437}
438
439function serializeUser(u: StoredUserInfo): Record<string, unknown> {
440 const user: Record<string, unknown> = { ...(u[UNKNOWN] ?? {}) };

Callers 1

serializeCredentialsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected