firebase / firebase/firebase-admin-node
[firebase/auth] Property 'updateProject' doesn't exist on type 'ProjectConfigManager'
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 419
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 16
Description
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);
```
Contributor guide
Assessment
This issue has not been assessed yet.