Remove credentials object from config, enable refresh token rewrite #51615
+110
−92
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.
What
Resolves #49842
How
QB refreshes the refresh_token every time a new refresh token is requested or after 24 hours whichever is earlier. This caused problems in clients where the connector stopped working after 24 hours.
This is solved by the refresh_token_updater field in the yaml, but that requires the refresh_token path to be non nested, so the credentials object was removed from the config in this PR (since QB had only 1 auth type) and all the config fields were moved to root level.
Once the config was no longer nested, refresh_token_updater was used to overwrite the refresh_token in the config with the new refresh token which is returned whenever the "old" refresh token is used to request for a new access token.
Review guide
User Impact
Breaking change, user will have to repopulate their config fields since we removed the nested credentials object.
Can this PR be safely reverted and rolled back?