firebase / firebase/firebase-admin-node
secretOrPrivateKey must be an asymmetric key when using RS256
- 主要言語
- TypeScript
- スター
- 1.7k
- フォーク
- 419
- 平均マージ
- 3日 10時間
- マージ済み PR(30日)
- 16
説明
* Operating System version: Ubuntu 22.10
* Firebase SDK version: 11.3.0
* Firebase Product: auth
* Node.js version: 16.13.2
* NPM version: 8.19.2
### [REQUIRED] Step 3: Describe the problem
I am using Firebase-Admin on a NestJs API, build with NX ; my API is using Admin SDK to create and manage users. For that, I am using the method auth.createUser({email, password}), but Firebase throws an error, ONLY FOR THE FIRST CALL :
`secretOrPrivateKey must be an asymmetric key when using RS256`
I know my private key is readed right, and most of all, only the first call to createUser returns error ; other calls are working great.. So I ended up putting a call with fake datas right after the initialization of Firebase, to be able to use it in other parts of my app, but it doesn't seem so terrible..! I can't find any other people having the same issue, really weird.
Any idea ?
コントリビューションガイド
調査の方向性
まず、記載されている Firebase Admin SDK と Node.js のバージョンを使って auth.createUser の初回呼び出しの失敗を再現し、次に Firebase Auth の初期化と RS256 キーの処理を追跡します。完了条件は、なぜ初回呼び出しだけが非対称キーを拒否するのかを特定し、createUser の初回呼び出しが成功することを検証する回帰テストを追加することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- firebase, nodejs, typescript
- 領域
- authentication
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100