We have been using Freshdesk Serverless app which uses Google OAuth for quite some time and never faced issues. However, we started seeing authentication errors yesterday. Upon investigation, we found that the access_token is not getting refreshed and the request method keeps passing the same expired token.
We tried the “Reauthorize” option in the Freshdesk app configuration option, but it didn’t help either. The only option that works for us is to uninstall/reinstall the app again. However, access_token's have a short validity, and we start seeing this again once the existing token expires.
I’ve tried to debug locally. However, it works flawlessly in local testing and automatically refreshes the token as and when required.
@Logesh_Narayanan
Can you clarify what kind of logs you expect me to share? We use Google OAuth and our backend service verifies the tokens using the https://oauth2.googleapis.com/tokeninfo endpoint. We get “invalid_token” error if the token is expired.
The problem here is that the app refreshes the access token as expected, but when we make calls using Request Method from our serverless app, the old token is still used for at least 10-15mins. The same happens even when we reauthorization.
In a nutshell, the new token is not immediately available to use via Request Method. We get the token specific to the previous account for 10-15mins even if we reauthorize using a different account.
Not to mention, OAuth flow works flawlessly in local testing and the tokens are getting refreshed normally and are immediately available on the next call through Request Method. So, I guess there is some internal delay that is causing the serverless app from getting the new token immediately.
@kaustavdm
Seems like the problem is not fully resolved. I was getting expired tokens until I reauthorize the app again. Will wait for some time and update here if it fails again.