Skip to content

Cannot add multifactor with phone number for new and current user #1048

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

Closed
grzegorz-ogrodowski opened this issue Sep 29, 2020 · 1 comment
Closed

Comments

@grzegorz-ogrodowski
Copy link

Operating System version: Win 10
Firebase SDK version: firebase admin 9.2.0
Firebase Product: auth
Angular version: 9.1.3

Steps to reproduce:
Try to update existing user for add multifactor with phone number. Using piece of code from
https://cloud.google.com/identity-platform/docs/admin/manage-mfa-users

Relevant Code:

admin.auth().updateUser('123456789', {
            multiFactor: {
              enrolledFactors: [
                {
                  // uid will be auto-generated.
                  phoneNumber: '+16505550003',
                  displayName: 'Spouse\'s phone',
                  factorId: 'phone',
                }
              ],
            },
          })
          .then((userRecord) => {
            console.log(userRecord.multiFactor.enrolledFactors);
          })
          .catch((error) => {
            console.log(error);
          })

Expected:
User is updated with new enrolledFactor

Result:
Code is not compilable:
Object literal may only specify known properties, and 'phoneNumber' does not exist in type 'UpdateMultiFactorInfoRequest'.

@zepolyerf
Copy link

@grzegorz-ogrodowski why did you close the issue? I'm running into the same error but with the CreateMultiFactorInfoRequest interface. Did you find any solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants