Xero Node.js SDK: Inconsistent State Key Handling on Reconnection
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 15/100
- Tipo de issue
- Bug
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Estagnada
- Stack de tecnologia
- nodejs, typescript
- Domínio
- authentication
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 264
- Forks
- 177
- Merge médio
- 10h 5min
- PRs com merge (30d)
- 5
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de XeroAPI/xero-node
-
`getClientCredentialsToken()` sends `scopes` (comma-joined) instead of the OAuth `scope` parameterAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
Dificuldade 3/5 Meio dia Facilidade para iniciantes 55/100
-
TrackingOptionId value missing from accountingApi.getInvoices()Talvez já em andamento @miachillgood assumiu há 152 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 18/100
-
BankTransaction type is missing the batchPayment object.Talvez já em andamento @miachillgood assumiu há 171 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 22/100
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 25/100
Todas as issues de XeroAPI/xero-node
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
super-productivity/super-productivity#12128 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
A docs change can fail pnpm check, because outreach lint and gen:types both write .astro/ at onceTalvez já em andamento @2389400626lh-ops assumiu hoje. AbertaArea: Infrastructure Area: Outreach Bug Difficulty: Low Good First Issue Priority: Low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
DouglasNeuroInformatics/OpenDataCapture#1956 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 72/100
justyns/silverbullet-ai#199 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
spartan-ng/spartan#1931 ·
Mantenedores costumam responder em até 2 dias