Add refreshTokenUrl to enable automatic OAuth token refresh#3
Open
jacobhaug wants to merge 1 commit into
Open
Conversation
This fixes the issue where users had to manually reconnect their OAuth connection every few weeks when access tokens expired. By adding the refreshTokenUrl property, n8n will now automatically refresh expired tokens using the stored refresh token, eliminating the need for manual reconnection.
|
Nice! I confirm that this is working. |
Author
|
@ryanrhughes can you review and merge please? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Users are experiencing OAuth token expiration errors every 1-2 weeks, requiring manual reconnection of their Basecamp OAuth credentials. The error message "Missing code query parameter" appears when access tokens expire, forcing users to manually reconnect through the n8n UI.
Solution
Added the
refreshTokenUrlproperty to the OAuth2 credentials configuration. This enables n8n's built-in OAuth2Api base class to automatically refresh expired access tokens using the stored refresh token, eliminating the need for manual reconnection.Changes
refreshTokenUrlproperty toBasecamp4OAuth2Api.credentials.tsaccessTokenUrl:https://launchpad.37signals.com/authorization/token?type=web_serverHow It Works
When n8n detects an expired access token, it will:
refreshTokenUrlendpointThis all happens transparently in the background without user intervention.
Testing
User Impact
After this change is merged and users update to the new version:
References
Ticket: #2