googleapis / google-api-nodejs-client

Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
https://googleapis.dev/nodejs/googleapis/latest/
Apache License 2.0
11.27k stars 1.91k forks source link

DeprecatedWarning for Buffer when using google Authentication #3388

Open obadahalak opened 7 months ago

obadahalak commented 7 months ago

hi, I try to Authenticate with google but I face the following error:

eprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use node --trace-deprecation ... to show where the warning was created)

image

Note: everything doing well in localhost

alexander-fenster commented 7 months ago

@obadahalak Can you post the full code and stack, if possible? (run Node.js with --trace-deprecation to show the stack)

It's unclear where exactly the authenticate function is coming from in your code. To the best of my knowledge, we don't have any usage of deprecated Buffer() in our code base, so having more information about your code would've been very helpful.

Thanks you!

obadahalak commented 7 months ago

@alexander-fenster yes, this is my full code https://github.com/obadahalak/peopleAPi/blob/main/index.js