Description
Based on the reCAPTCHA SMS toll fraud protection google article I should be able to call updateProject on a ProjectConfigManager.
I found no trace of this updateProject method, I checked the ProjectConfigManager reference too, no such method. I also tried the method updateProjectConfig but the updateProjectConfig does take an instance of a UpdateProjectConfigRequest, so the properties of that interface are emailPrivacyConfig, multiFactorConfig, passwordPolicyConfig, recaptchaConfig and smsRegionConfig, thus they differ completely from phoneEnforcementState, useSmsTollFraudProtection and tollFraudManagedRules needed by the hypothetical updateProject provided in the adminSdk snippet at toll fraud protection docs
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);