Xero Node.js SDK: Inconsistent State Key Handling on Reconnection
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 15/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- nodejs, typescript
- Bereich
- authentication
Rechercherichtung
The payload names no file, function or test, so the only entry point is the reproduction steps: connect, disconnect from Xero's Connected Apps page, then reconnect within a minute with a different state value. Check whether the callback echoes the new state or the old one, and whether the cause lies in the SDK or in the caller's code. The issue has no decided fix, so 'done' is not yet defined. Confirm with a maintainer first.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
SDK you're using (please complete the following information):
- Version [5.1.0]
Describe the bug
Hi,
As I debugging into this issue, here's what I've observed:
When I swiftly log in with Xero using their Node.js SDK (xero-node) and promptly disconnect, then attempt to reconnect:
This issue only occurs when the disconnection happens from Xero's Website > Connected Apps. Here's the sequence:
- Connect with the Node.js SDK.
- Disconnect from Xero's website.
- Then reconnect again using the Node.js SDK
========================================================================================
- Initially, I send a state key under the key = 662f065f05170899644a5a28.
- Upon receiving the callback from the Xero API endpoints, it echoes back the same state key = 662f065f05170899644a5a28.
- Upon attempting to reconnect (after disconnection from xero's website), I send a new state key = 662f081ed32ff9d3e845ecd7.
- However, on the second attempt, the Xero callback API endpoint still sends back the first state key = 62f065f05170899644a5a28.
The state key serves as an identifier to verify if the user is genuine and if the authentication request has been duly validated.
As I have meticulously reviewed the live server logs at every step, I am confident that I have not sent the wrong ID, and there is no possibility of error on my part in this matter.
To Reproduce
- Steps to reproduce the behavior:
- Begin by installing the latest version of the xero-node SDK, version 5.1.0.
- Set up the SDK with authentication and callback for a static user.
- On the initial connection, set the value in the state key to 1.
- After successfully establishing the connection, disconnect it from xero's website.
- Initiate the authentication process for the second time.
- This time, change the value in the state key to 2.
- Perform the connection, disconnection, and reconnection process promptly, within 30 seconds or a minute.
- Upon inspecting the callback API response during the second connection attempt, observe that Xero is sending the state key as 1 instead of 2. Ideally, it should reflect the updated value of 2.
Expected behavior
As described in the steps to reproduce the issue, during the first API callback, the state parameter correctly reflects the value of 1. However, upon the second callback, it is expected to send 2 as illustrated in the example. Instead, it continues to send 1.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 264
- Forks
- 177
- Ø Merge
- 10 Std. 5 Min.
- Gemergte PRs (30 T.)
- 5
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus XeroAPI/xero-node
-
`getClientCredentialsToken()` sends `scopes` (comma-joined) instead of the OAuth `scope` parameterOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 55/100
-
TrackingOptionId value missing from accountingApi.getInvoices()Evtl. vergeben @miachillgood hat das vor 152 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 18/100
-
BankTransaction type is missing the batchPayment object.Evtl. vergeben @miachillgood hat das vor 171 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 22/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 25/100
Alle Issues in XeroAPI/xero-node
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
super-productivity/super-productivity#12128 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
A docs change can fail pnpm check, because outreach lint and gen:types both write .astro/ at onceEvtl. vergeben @2389400626lh-ops hat das heute übernommen. OffenArea: Infrastructure Area: Outreach Bug Difficulty: Low Good First Issue Priority: Low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
DouglasNeuroInformatics/OpenDataCapture#1956 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 72/100
justyns/silverbullet-ai#199 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
spartan-ng/spartan#1931 ·
Maintainer antworten meist innerhalb von 2 Tagen