Oauth access_token is not refreshing

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.

1 Like

Hi @ThirumalaiK, thanks for reporting this. We have received similar reports and our team is looking into it.

Hi @ThirumalaiK,

Thanks for reaching out. Can you share with us the app zip file and any available error logs which would help us to debug further.

Thank you.

@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.

@ThirumalaiK Our team has deployed a fix for the access_token refresh issue. Can you please check and confirm if your issue has been resolved?

1 Like

@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.

@kaustavdm
Everything seems to be normal now. Thanks for the prompt support :slight_smile:

1 Like

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.