这是indexloc提供的服务,不要输入任何密码
Skip to content

FACTOR_ID static string returning "undefined" for PhoneMultifactorGenerator #5480

@devfmartell

Description

@devfmartell

After we upgraded from V8 to V9 our MFA was not working anymore.
We were using that static string (FACTOR_ID in the PhoneMultifactorGenerator) to do a check on the factorId property in the resolver's hint for MFA. Now the value of FACTOR_ID is undefined instead of "phone". Sample code below.

We are only allowing phone as a second factor, which is why this check is there. For now we hardcoded this as a string but we would like to keep using the static enum/string since it should always match the resolver's hint factor.

Any idea why is this now undefined or if there is a fix in the near future?
firebase": "9.0.2

import "firebase/compat/auth";

if ( this.resolver.hints[0].factorId === firebase.auth.PhoneMultiFactorGenerator.FACTOR_ID && this.recaptchaVerifier ) {}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions