Use Oauth2 access_token and xero tenant id to instantiate connection#17
Merged
Use Oauth2 access_token and xero tenant id to instantiate connection#17
Conversation
| end | ||
|
|
||
| def current(api_key:, account_key:, api_url:) | ||
| def current(access_token:, xero_tenant_id:) |
Contributor
There was a problem hiding this comment.
I wonder if this could just be tenant_id?
In the context of xpm I'm not sure the xero_ prefix adds much?
Contributor
Author
There was a problem hiding this comment.
Hmmm, what we send to the API though is xero-tenant-id and I thought we should keep it consistent with the docs...
Contributor
There was a problem hiding this comment.
ah okay that makes sense
bedrock-adam
approved these changes
Apr 29, 2020
Contributor
bedrock-adam
left a comment
There was a problem hiding this comment.
Nice work 🚀 👍
Preference would be to drop the xero_ prefix more to type but you can make the final call on that.
Contributor
|
🚢 |
lankz
pushed a commit
that referenced
this pull request
Jun 10, 2025
…17) * Refactor connection to use access token and xero_tenant_id * Fix job spec * use access_token for staff * template fix * rubocop fixes * Use new connection settings for client * Rubocop fix
lankz
pushed a commit
that referenced
this pull request
Jun 10, 2025
…17) * Refactor connection to use access token and xero_tenant_id * Fix job spec * use access_token for staff * template fix * rubocop fixes * Use new connection settings for client * Rubocop fix
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.
Also, use practice manager endpoint.
Because we managed to get Oauth2 working, we need to update this gem to use the new credentials applied (as well as the new endpoint).
In our conversation with Xero, their devs informed us they think most of our customers are probably XPM instead of WFM (though this is TBD).
At the moment we are thinking we will let the main app handle the oauth2 setup and expiring access tokens (but we may bring them into the gem eventually if it makes sense).