WorkOS Docs Homepage
Integrations

Xero OAuth

Learn how to set up OAuth with Xero.

To configure your global Xero OAuth setup, you’ll need three pieces of information: a Redirect URI, a Xero Client ID, and a Xero Client Secret.

WorkOS provides the Redirect URI, an allowlisted callback URL. It indicates the location to return an authorized user to after both an authorization code is granted, and the authentication process is complete.

Open your WorkOS Dashboard and browse to the Authentication section on the left hand navigation bar. Scroll down to the Xero OAuth section and click Configure.

In the modal, you’ll see the Redirect URI as well as the fields you’ll populate later with information from Xero. This URI will be used as part of the registration process later in the Xero developer settings page.

In order to integrate you’ll need the Xero Client ID and the Xero Client Secret.

These are a pair of credentials provided by Xero that you’ll use to authenticate your application via the OAuth protocol. To obtain them:

Log in to your Xero developer account and create a new application.

A screenshot showing the Xero developer homepage.

In the top right corner, select New app.

Fill out the form starting with the application name.

A screenshot showing the Xero form to create a new OAuth application.

For the Integration type, select Web app.

For Company or application URI, use your application’s homepage URI.

For Redirect URI, use the Redirect URI from the Xero OAuth configuration modal in the WorkOS Dashboard.

A screenshot showing OAuth client credentials in the Xero application settings

Agree to Xero’s Developer Platform Terms & Conditions and click on Create app.

On the next page, you will see the Xero App details for your new OAuth application.

From the left sidebar, navigate to the Configuration page.

A screenshot showing OAuth client credentials in the Xero application settings before creating a client secret

Select Generate a secret to create a client secret.

A screenshot showing OAuth client credentials in the Xero application settings after creating a client secret

Copy the Client ID and Client secret 1.

In the next step, you will provide both the Xero Client ID and Client Secret to the WorkOS dashboard.

Go back to the Authentication section in the WorkOS Dashboard, and click on Edit under Xero OAuth.

A screenshot showing OAuth client credentials in the WorkOS Xero setup modal filled with client id and client secret.

Toggle Enabled on and provide the client credentials from Xero that you generated in the previous step.

Finally, click Save.

You are now ready to start authenticating with Xero OAuth. Your users will see the option to sign-in with Xero when visiting your AuthKit domain.