firebase / firebase/firebase-admin-node
[firebase/auth] Property 'updateProject' doesn't exist on type 'ProjectConfigManager'
- 主要言語
- TypeScript
- スター
- 1.7k
- フォーク
- 419
- 平均マージ
- 3日 10時間
- マージ済み PR(30日)
- 16
説明
Based on [the reCAPTCHA SMS toll fraud protection google article](https://cloud.google.com/identity-platform/docs/recaptcha-tfp) I should be able to call updateProject on a ProjectConfigManager.
I found no trace of this updateProject method, I checked the [ProjectConfigManager reference](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.projectconfigmanager) too, no such method. I also tried the method [updateProjectConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.projectconfigmanager#projectconfigmanagerupdateprojectconfig) but the [updateProjectConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.projectconfigmanager#projectconfigmanagerupdateprojectconfig) does take an instance of a [UpdateProjectConfigRequest](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.updateprojectconfigrequest.md#updateprojectconfigrequest_interface), so the properties of that interface are [emailPrivacyConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.updateprojectconfigrequest.md#updateprojectconfigrequestemailprivacyconfig), [multiFactorConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.updateprojectconfigrequest.md#updateprojectconfigrequestmultifactorconfig), [passwordPolicyConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.updateprojectconfigrequest.md#updateprojectconfigrequestpasswordpolicyconfig), [recaptchaConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.updateprojectconfigrequest.md#updateprojectconfigrequestrecaptchaconfig) and [smsRegionConfig](https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.updateprojectconfigrequest.md#updateprojectconfigrequestsmsregionconfig), thus they differ completely from phoneEnforcementState, useSmsTollFraudProtection and tollFraudManagedRules needed by the hypothetical updateProject provided in the adminSdk snippet at [toll fraud protection docs](https://cloud.google.com/identity-platform/docs/recaptcha-tfp)
Here is the code snippet for the admin sdk provided on the google article:
```
// Update the reCAPTCHA config to enable toll fraud protection
const updateProjectConfigRequest = {
recaptchaConfig: {
phoneEnforcementState: 'ENFORCE_MODE',
useSmsTollFraudProtection: 'true',
tollFraudManagedRules: [{ startScore: START_SCORE,
action: 'BLOCK' }],
}
}
let projectConfig = await getAuth().projectConfigManager().updateProject(updateProjectConfigRequest);
```
コントリビューションガイド
調査の方向性
まず、ProjectConfigManager.updateProjectConfig と UpdateProjectConfigRequest を、料金詐欺対策用の Google reCAPTCHA スニペットと比較します。ProjectConfigManager と recaptchaConfig のエントリーポイントをたどり、updateProject が存在しないのか、それとも外部ドキュメントが古くなっているのかを判断します。SDK の動作とドキュメントが、サポートされるリクエスト形式について一致すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- nodejs, typescript
- 領域
- api, authentication
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100