Understanding OAuth Mechanism
OAuth is a secure authorization protocol that allows applications to authenticate and interact on behalf of the user. Here's how the OAuth flow typically works in Pabbly Connect:- User Authorization: The user initiates the process by clicking a "Sign In with the app" button, launching a popup to grant Pabbly Connect access to their account.
- Access Token Generation: Once permissions are granted, Pabbly Connect receives an access token from the application.
- Access Token Use: This token is used to make API requests on behalf of the user.
- Token Expiry and Refresh: Access tokens have a limited lifespan. On expiry, Pabbly Connect uses the "refresh token" to generate a new "access token".
Access Token Lifecycle
- Limited Validity: Access tokens are usually valid for few days to a month and the validity can vary based on the software vendor's policy.
- Automatic Regeneration: Pabbly Connect automatically regenerates the access token using the refresh token upon expiry.
- Long-Lived Refresh Tokens: Refresh tokens generally have a longer lifespan, and some may never expire. However, again it depends upon the software vendor policy.
When Refresh Tokens Fail
- Invalidation Scenarios: In rare cases, the refresh token itself may be invalidated, preventing the regeneration of the access token.
- No Regeneration Possible: Without a valid refresh token, Pabbly Connect cannot regenerate an access token, rendering the connection inoperable.
- User Notification: The new update provides detailed error responses, including the OAuthException key, alerting users to the invalidation of the refresh token.
This error will generally mean that the refresh token in itself is invalidated. In that case, you will have to create a fresh new connection.
Usually refresh tokens are long lived and are invalidated when no API activity happens for a longer time window. However, some software vendors can invalidate refresh tokens in short span of 1-7 days (few days). In those cases, you will have to create a fresh new connection on refresh token expiry.
In order to resolve the issue, you will be required to create a new connection of the same application for which you're receiving the same error. You will simply have to click on the "Connected" button and make a new connection. Refer to below screenshot to know how to make a new connection for any application -
Here's how you will make a new connection -
Attachments
Last edited by a moderator: