Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Crypto - KeyObject is undefined for Node V14 - "jsonwebtoken": "9.0.0"

オープン
#885 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, node.js
領域
backend

調査の方向性

jwt.sign の例を使用して、Node v14.10.1 上の jsonwebtoken 9.0.0 で失敗を再現します。報告された行付近にある sign.js の KeyObject チェックから始め、同じ署名呼び出しがその Node バージョンで TypeError をスローしなくなったら、Issue は完了とします。

索引モデルが issue の本文から書いたものです。

説明

Please do not report security vulnerabilities here. The Responsible Disclosure Program details the procedure for disclosing security issues.

Thank you in advance for helping us to improve this library! Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the Auth0 Community or Auth0 Support. Finally, to avoid duplicates, please search existing Issues before submitting one here.

By submitting an Issue to this repository, you agree to the terms within the Auth0 Code of Conduct.

Description
KeyObject from Crypto is undefined. I am using Node 14.10.1. 
Reproduction

NODE v14.10.1
jwt.sign({email: "bar@foo"}, "PRIVATE_KEY", { algorithm: 'HS512' })

Throws an error
webpack-internal:///…ebtoken/sign.js:173 Uncaught (in promise) TypeError: Right-hand side of 'instanceof' is not an object
at module.exports [as sign] (sign.js:108:1)
if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) {

image
Environment

Please provide the following:

  • Version of this library used: 9.0.0
  • Version of the platform or framework used, if applicable: any platform
  • Other relevant versions (language, server software, OS, browser):
  • Other modules/plugins/libraries that might be involved:
主要言語
JavaScript
スター
18.2k
フォーク
1.3k
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

auth0/node-jsonwebtoken のほかの issue

auth0/node-jsonwebtoken の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。