0

I'm using the Xero OAuth2 code flow to authenticate my users. I'm trying to use the access token (a JWT) returned by Xero in order to authenticate requests against a Fauna database. This is theoretically possible by using a Fauna AccessProvider, which is a feature that allows third-party identity providers to authenticate requests against a Fauna database.

Fauna's docs on using its AccessProvider give examples for setting it up with Auth0, but I'm trying to determine whether I can use Xero's OAuth2 functionality instead. This would mean I need Xero to include a second value in the aud field of the access token JWT. From this other StackOverflow post and from looking at the access token, I can see that the aud field is set to the string 'https://identity.xero.com/resources'. Is it possible to configure Xero to set this value to an array that includes a custom value? I need it to include the Audience value set on my AccessProvider instance as documented in this blog post.

I looked through the settings for my app within my Xero developer account, and I don't see any place to add a value to the aud included in the access token.

I've read through the Xero documentation and Googled for any examples of this, but I didn't find any other writing on the subject.

Alex Nitta
  • 21
  • 6

1 Answers1

0

I received this answer from Xero Support:

The access token retrieved from Xero using OAuth is not customisable and so you would not be able to add in the audience.

So it looks like this is not possible, unfortunately.

Alex Nitta
  • 21
  • 6