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

Method getCurrentUser

packages/cli/src/auth/client.ts:113–116  ·  view source on GitHub ↗

* `GET /v3/users/me`. Throws `ErrUnauthenticated` on 401, `ErrApi` * on any other non-2xx or non-JSON body. * * On OAuth 401 with a refresh hook configured, the request is * retried once after refreshing the access token. The retry's * outcome is what the caller sees — if the refresh

(credential: ResolvedCredential)

Source from the content-addressed store, hash-verified

111 * "please log in again" path upstream.
112 */
113 async getCurrentUser(credential: ResolvedCredential): Promise<UserInfo> {
114 const url = `${this.base}/v3/users/me`;
115 return await this.fetchUser(url, credential, true);
116 }
117
118 // fallow-ignore-next-line complexity
119 private async fetchUser(

Callers 4

verifyFunction · 0.95
reportIdentityFunction · 0.95
verifyAndReportFunction · 0.95
client.test.tsFile · 0.45

Calls 1

fetchUserMethod · 0.95

Tested by

no test coverage detected