I’m using the Xero’s NodeJs implementation here:
https://github.com/XeroAPI/xero-node-oauth2-app
I created and provided in the code the secrets CLIENT_ID
, CLIENT_SECRET
, and REDIRECT_URI
.
However, when I call the endpoint http://localhost:5000/connect
, which runs this code:
app.get('/connect', async (req: Request, res: Response) => {
try {
const consentUrl: string = await xero.buildConsentUrl();
res.redirect(consentUrl);
} catch (err) {
console.log(err)
res.send('Sorry, something went wrong');
}
});
I get this error:
AggregateError: Issuer.discover() failed.
OPError: expected 200 OK with body but no body was returned
OPError: expected 200 OK, got: 301 Moved Permanently
Any ideas on how to work pass this error? I used this repository last year and had no issues.
I tried resetting the CLIENT_ID
, CLIENT_SECRET
linked to my account without any luck
Emiliano Giusto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.