Authentication Error(checks.state argument is missing)
See original GitHub issueSDK you’re using (please complete the following information):
- Version 4.11.2
Describe the bug Getting following error after successfully authenticating with Xero
TypeError: checks.state argument is missing
at Client.callback (/Users/bhrigusharma/Documents/work/web-backend/node_modules/openid-client/lib/client.js:398:13)
at XeroClient.<anonymous> (/Users/bhrigusharma/Documents/work/web-backend/node_modules/xero-node/src/XeroClient.ts:118:48)
at Generator.next (<anonymous>)
at /Users/bhrigusharma/Documents/work/web-backend/node_modules/xero-node/dist/XeroClient.js:8:71
at new Promise (<anonymous>)
at __awaiter (/Users/bhrigusharma/Documents/work/web-backend/node_modules/xero-node/dist/XeroClient.js:4:12)
at XeroClient.apiCallback (/Users/bhrigusharma/Documents/work/web-backend/node_modules/xero-node/dist/XeroClient.js:77:16)
at XeroNetworkService.<anonymous> (/Users/bhrigusharma/Documents/work/web-backend/src/modules/xero/xero.network.ts:30:53)
at Generator.next (<anonymous>)
at fulfilled (/Users/bhrigusharma/Documents/work/web-backend/src/modules/xero/xero.network.ts:11:58)
apiCallback
is throwing the error the above error
To Reproduce Steps to reproduce the behavior:
- Create an auth URL using
buildConsentUrl
- Go to the above-generated URL and authenticate successfully
- Pass the URL which we get after redirection to
apiCallback
url passed to apiCallback
is like /finishAuth?code=<code>&scope=openid%20profile%20email%20accounting.reports.read%20accounting.settings&state=<state>&session_state=<session_state>
Expected behavior Should not throw an error instead should generate tokens
Additional context
I upgraded my xero-node
from 4.8.1
to 4.11.2
and my authentication flow stopped working
Everthing was working fine on 4.8.1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:20 (8 by maintainers)
Top Results From Across the Web
BadRequestError: checks.state argument is missing
I am using express-openid-connect v1.0.1 and the new Universal Login page. Interestingly I never run into this when testing locally, only on the ......
Read more >BadRequestError: checks.state argument is missing · Issue #145
BadRequestError: checks.state argument is missing would suggest that the transient state cookie is missing when your browser returns to the /callback url. When ......
Read more >Debugging "checks.state argument is missing" error AUTH0
I am wondering if there are some configuration options that I may be missing in my login handler. import { handleAuth, handleLogin }...
Read more >Checks.state argument is missing error - Console Login Issue
For the past week or so I have been unable to login to the console and have been receiving a message “checks. state...
Read more >Errors - NextAuth.js - JS.ORG
This can occur during the handling of the callback if the code_verifier cookie was not found or an invalid state was returned from...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is yet another breaking change that is released as a minor version. Breaking changes should bump the major version of a package. Very frustrating.
We would never under any circumstances use this code on the front-end, so that is a moot argument. But it’s alright, we will pass the parameter in the config of the client.