gcf-gmail-codelab icon indicating copy to clipboard operation
gcf-gmail-codelab copied to clipboard

express-oauth2-handlers should be replaced

Open ahmaxed opened this issue 5 years ago • 2 comments

express-oauth2-handlers module causes the DeprecationWarning: The 'refreshAccessToken' method has been deprecated error.

Additionally the module has been abandoned and need to be replaced with an alternative solution.

GoogleCloudPlatform/express-oauth2-handlers#10

ahmaxed avatar Oct 19 '20 09:10 ahmaxed

You can use , its worked. const accessToken = await oauth2Client.getAccessToken(); https://stackoverflow.com/questions/53094706/how-do-you-use-google-api-getrequestheaders-to-get-an-oauth2-access-token

vijay0099 avatar Nov 26 '20 12:11 vijay0099

not if you are running the LTS version of Node.js. even if it does work it is not updated anymore which means not secure. due to the lack of good update documentation on performing this specific use case it has set me back exponentially on my project. everything is wrote for node 8 which is now deprecated as well. what does a person have to do to get a little upkeep. and note it says on the code lab it was update on feb of 2021, i don't see how when it still uses deprecated unsecure methods and the code lab is exactly the same prior to February

jdtyler-dev avatar Mar 01 '21 23:03 jdtyler-dev