I'm using a Google Sheets connected system in Appian with OAuth 2.0 authentication. The integration works initially, but I'm encountering an issue where the connection requires reauthorization almost every hour.
Has anyone faced a similar problem with token expiration or session persistence? Is there a recommended way to maintain or refresh the token without requiring manual reauthorization so frequently?
Appreciate any suggestions or best practices to resolve this.
Discussion posts and replies are publicly visible
I have not worked with this connected system personally but these are my 2 cents -
The lifetime of an authentication/authorization depends on the token type involved. As per Googles' Access Token Documentation by default, access tokens are good for 1 hour (3,600 seconds). Looks like in your case also, the token type involved is of same kind. The above documentation also mentioned a method to extend token lifetime up to 12 hours.
Another way to extend the session is to work with both Access and Refresh tokens so that reauthorization happens in the backend using refresh tokens but personally, I feel there can be some overhead to maintain the access-refresh tokens for a user. So it needs careful consideration.
Hope this sends you in a direction to have a discussion with your API team to resolve this.
I’ll take your suggestion and coordinate with our API team to explore the 12-hour token extension and also review how we can better manage access-refresh tokens securely.