can't verify token. it will show 500 error code.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- express, javascript, node.js
- Domain
- authentication, backend, security
Research direction
Start by reproducing jwt.verify(token, 'Refresh_Access_Secret') with the reported jsonwebtoken 8.5.1 setup, then inspect the error-handling path at src/config/express.js around the reported line 80. Determine why the resulting response receives an undefined HTTP status, and confirm that token-verification failures produce a valid, documented response.
Written by the indexing model from the issue text.
Description
Description
my code:
jwt.verify(token, 'Refresh_Access_Secret');
i verify token. it show below error.
GET /api/user/refreshtoken 500 7.732 ms - 1021
RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined
at new NodeError (node:internal/errors:372:5)
at ServerResponse.writeHead (node:_http_server:275:11)
at ServerResponse.writeHead (D:\reactjs\mysql\node_modules\on-headers\index.js:44:26)
at ServerResponse._implicitHeader (node:http_server:266:8)
at write (node:_http_outgoing:766:9)
at ServerResponse.end (node:_http_outgoing:855:5)
at ServerResponse.send (D:\reactjs\mysql\node_modules\express\lib\response.js:221:10)
at ServerResponse.json (D:\reactjs\mysql\node_modules\express\lib\response.js:267:15)
at eval (webpack://mysql/./src/config/express.js?:80:26)
at Layer.handle_error (D:\reactjs\mysql\node_modules\express\lib\router\layer.js:71:5)
Reproduction
when i verify token ' jwt.verify(token, 'Refresh_Access_Secret');'
Where applicable, please include:
program run the below code. it will show 'RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined';
jwt.verify(token, 'Refresh_Access_Secret');
Environment
Please provide the following:
OS: windows 10
"jsonwebtoken": "^8.5.1",
- Dominant language
- JavaScript
- Stars
- 18.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from auth0/node-jsonwebtoken
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
auth0/node-jsonwebtoken#1042 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
auth0/node-jsonwebtoken#1000 · 2 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 65/100
auth0/node-jsonwebtoken#1046 ·
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
auth0/node-jsonwebtoken#1034 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
auth0/node-jsonwebtoken#1032 ·
All issues in auth0/node-jsonwebtoken
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
antfu-collective/icones#398 ·
-
ECmail.com Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
wesbos/burner-email-providers#554 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
components-web-app/docs#92 ·