Xero Node.js SDK: Inconsistent State Key Handling on Reconnection
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 15/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- nodejs, typescript
- Lĩnh vực
- authentication
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 264
- Fork
- 177
- Merge trung bình
- 10 giờ 5 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của XeroAPI/xero-node
-
`getClientCredentialsToken()` sends `scopes` (comma-joined) instead of the OAuth `scope` parameterĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 55/100
-
TrackingOptionId value missing from accountingApi.getInvoices()Có thể đã có người làm @miachillgood đã nhận 152 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 18/100
-
BankTransaction type is missing the batchPayment object.Có thể đã có người làm @miachillgood đã nhận 171 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 22/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
Tất cả issue của XeroAPI/xero-node
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
super-productivity/super-productivity#12128 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A docs change can fail pnpm check, because outreach lint and gen:types both write .astro/ at onceCó thể đã có người làm @2389400626lh-ops đã nhận hôm nay. Đang mởArea: Infrastructure Area: Outreach Bug Difficulty: Low Good First Issue Priority: Low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
DouglasNeuroInformatics/OpenDataCapture#1956 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
justyns/silverbullet-ai#199 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
spartan-ng/spartan#1931 ·
Maintainer thường phản hồi trong vòng 2 ngày