firebase / firebase/firebase-admin-node

[firebase/auth] Property 'updateProject' doesn't exist on type 'ProjectConfigManager'

Aperta
#2,833 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
api: auth
Lingua principale
TypeScript
Stelle
1.7k
Fork
419
Merge medio
3g 10h
PR unite (30g)
16

Descrizione

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);
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
nodejs, typescript
Ambito
api, authentication
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.