Open
Description
Please make sure you have searched for information in the following guides.
- Search the issues already opened: https://github.com/GoogleCloudPlatform/google-cloud-node/issues
- Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js
- Check our Troubleshooting guide: https://github.com/googleapis/google-cloud-node/blob/main/docs/troubleshooting.md
- Check our FAQ: https://github.com/googleapis/google-cloud-node/blob/main/docs/faq.md
- Check our libraries HOW-TO: https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md
- Check out our authentication guide: https://github.com/googleapis/google-auth-library-nodejs
- Check out handwritten samples for many of our APIs: https://github.com/GoogleCloudPlatform/nodejs-docs-samples
A screenshot that you have tested with "Try this API".
Appears like the latest version of googleapis
is incompatible with google-auth-library
.
A step-by-step description of how to reproduce the issue, based on the linked reproduction.
const oauth2Client = new OAuth2Client(
config.GOOGLE_OAUTH2_CLIENT_ID,
config.GOOGLE_OAUTH2_CLIENT_SECRET,
pathToAbsoluteUrl(getPath('/oauth/google/callback')),
);
const result = await oauth2Client.getToken(code);
const tokens = result.tokens;
oauth2Client.setCredentials({
access_token: tokens.access_token,
});
const oauth2 = google.oauth2({
auth: oauth2Client,
version: 'v2',
});
A clear and concise description of what the bug is, and what you expected to happen.
The above code sample is giving:
No overload matches this call.
Overload 1 of 2, '(version: "v2"): Oauth2', gave the following error.
Argument of type '{ auth: OAuth2Client; version: string; }' is not assignable to parameter of type '"v2"'.
Overload 2 of 2, '(options: Options): Oauth2', gave the following error.
Type 'OAuth2Client' is not assignable to type 'string | GoogleAuth<AuthClient> | OAuth2Client | BaseExternalAccountClient | undefined'.
Type 'OAuth2Client' is missing the following properties from type 'OAuth2Client': fetch, addUserProjectAndAuthHeadersts(2769)
A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **
Because it worked prior to the latest upgrade and it is not described as a breaking change in the changelog.
Metadata
Metadata
Assignees
Labels
No labels