Skip to content

createFromGoogleCredential is not compatible with google-auth-library 10.x.x #2993

@valkum

Description

@valkum

Problem description

google-auth-library 10.x adopted and moved forward to node native fetch. Thus they switched from

export interface Headers {
  [index: string]: string;
}

to Headers defined in Node.

createFromGoogleCredential uses the following interface

export interface CurrentOAuth2Client {
    getRequestHeaders: (url?: string) => Promise<{
        [index: string]: string;
    }>;
}

which is incompatible.

Reproduction steps

Try createFromGoogleCredential with a client created with google-auth-library 10.x

Environment

  • OS name, version and architecture: aarch64, MacOS
  • Node version: 21
  • Node installation method: volta
  • If applicable, compiler version [e.g. clang 3.8.0-2ubuntu4]
  • Package name and version "@grpc/grpc-js": "^1.13.0",

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions