diff --git a/src/auth/oauth/password.ts b/src/auth/oauth/password.ts index dfd2bbf..762f545 100644 --- a/src/auth/oauth/password.ts +++ b/src/auth/oauth/password.ts @@ -33,7 +33,9 @@ export class OAuth2PasswordAuth implements Auth { } // Append the access token to the original request. - const authData = await authResponse.json(); + const authData = (await authResponse.json()) as { + access_token: string | undefined; + }; const token = authData["access_token"]; if (!token) { diff --git a/src/util/headers.ts b/src/util/headers.ts index 880a57a..23fddd1 100644 --- a/src/util/headers.ts +++ b/src/util/headers.ts @@ -14,5 +14,5 @@ export function parseHeaders(headers: string[]): Headers { } result.append(key.trim(), value.trim()); }); - return result; + return result as Headers; // Weird bug? }