I am storing the access_token and refresh_token generated into the database. When the access_token expires I need to refresh the access token using refresh_token. This I have achieved by following method:
oauth2Client.refreshAccessToken(function (err, tokens) {
if (err) {
console.log("Error in refreshing token: " + err);
return;
}
if (tokens) {
console.log("tokens:- ", tokens);
}
});
But the issue here is that using Webstorm as an IDE it is showing that the method "refreshaccesstoken" is deprecated. Can anyone help me in this situation !