Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

xero-node on rest api

Started by Test User -   in API Authentication


I would like to use xero-node with authentication on a REST API project.

In the examples from Xero, a full stack app is used with Express so req.session can be used to store the oauthRestToken. This can be used after the Xero login, when the '/callback' endpoint is used.

req.session.oauthRequestToken = token;

How can this be implemented when using a REST API which is stateless? Can I store the token in the local browser storage and pass a header in from the Client? The issue with this is the '/callback' endpoint is called from the Xero auth.