firebase / firebase/firebase-admin-node
[firebase/auth] Property 'updateProject' doesn't exist on type 'ProjectConfigManager'
- Ngôn ngữ chính
- TypeScript
- Star
- 1.7k
- Fork
- 419
- Merge trung bình
- 3 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 16
Mô tả
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);
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Start by comparing ProjectConfigManager.updateProjectConfig and UpdateProjectConfigRequest with the Google reCAPTCHA toll fraud protection snippet. Trace the ProjectConfigManager and recaptchaConfig entry points to determine whether updateProject is missing or the external documentation is outdated. Done means the SDK behavior and documentation agree on the supported request shape.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- nodejs, typescript
- Lĩnh vực
- api, authentication
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100