WorryFree Computers   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FACTOR_ID static string returning "undefined" for PhoneMultifactorGenerator #5480

Closed
devfmartell opened this issue Sep 10, 2021 · 2 comments · Fixed by #5487
Closed

FACTOR_ID static string returning "undefined" for PhoneMultifactorGenerator #5480

devfmartell opened this issue Sep 10, 2021 · 2 comments · Fixed by #5487

Comments

@devfmartell
Copy link
devfmartell commented Sep 10, 2021

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 ) {}
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@sam-gc
Copy link
Contributor
sam-gc commented Sep 13, 2021

Thanks for pointing this out! We are working on a fix

@firebase firebase locked and limited conversation to collaborators Oct 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants