Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update Xero integration from OAuth1 to OAuth2 #64

Merged
merged 2 commits into from
Jun 30, 2020

Conversation

nabilfreeman
Copy link
Contributor

@nabilfreeman nabilfreeman commented Jun 26, 2020

OAuth1 has been deprecated by Xero since Feb 2020:
https://devblog.xero.com/an-update-on-why-we-are-saying-goodbye-oauth-1-0a-hello-oauth-2-0-6a839230908f

Here's a PR to support OAuth 2. Our app didn't actually work (mentioned #63) with OAuth1 because it was made in March!

I had to change the baseURL to https://api.xero.com rather than the previous https://api.xero.com/api.xro/2.0/.

Xero requires a xero-tenant-id header to be passed with subsequent requests to gain access to business accounts the user has access to.

The only way to get this xero-tenant-id is to query:

GET https://api.xero.com/connections

Then after obtaining the tenant ID you can query:

GET https://api.xero.com/api.xro/2.0/... with an added header xero-tenant-id: "abcdefg-12345".

Question: Is there an organization plan for the json files for different supported OAuth versions? E.g. xero, xero-oauth1, xero-oauth2?

@gotbadger gotbadger requested a review from Frenchcooc June 29, 2020 12:02
Copy link
Contributor

@Frenchcooc Frenchcooc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Nabil. Thanks a lot for the contribution!

Regarding the filename, as Xero has deprecated the OAuth1 integration, I totally agree with scratching the old integration (xero.json). Noone needs the OAuth1 configuration anymore. But I still don't kow what would be best to do when we would have two different authorization method that works in parallel. Using api-x-oauth1 and api-x-oauth2 seems a bit verbose, but at least it works well...

@Frenchcooc Frenchcooc merged commit 602fce5 into NangoHQ:master Jun 30, 2020
nango-repository-pusher bot pushed a commit that referenced this pull request Oct 21, 2024
…sed on changes in NangoHQ/integration-templates@7d7b609 by Andres Reales. Commit message: feat(Intercom): add users syncs and actions to intercom integration (#64)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants