WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@pragatimodi
Copy link
Contributor

@pragatimodi pragatimodi commented Nov 8, 2023

No integration tests.
Manually tested input

const users = [
  {
    uid: '3456',
    email: '[email protected]',
    emailVerified:true,
    multiFactor: {
      enrolledFactors: [
        {
          uid: 'enrolledSecondFactor1',
          phoneNumber: '+16505557348',
          displayName: "Spouse's phone number",
          factorId: 'phone',
          enrollmentTime: nowString,
        },
        {
          uid: 'enrolledSecondFactor2',
          phoneNumber: '+16505551000',
          factorId: 'phone',
        },
        {
          uid: 'enrolledSecondFactor3',
          enrollmentTime: nowString,
          displayName: 'displayNameTotp',
          totpInfo: {
            sharedSecretKey: 'VIAAQYSO37EKAWB2KAXEQ7EGUMLWI3P4',
          },
          factorId: 'totp',
        },
      ],
    },
  },
];

getAuth()
  .importUsers(users)
  .then((importedUsers) => {
    console.log(JSON.stringify(importedUsers));
  })
  .catch((error) => {
    console.error('Error importing users:', error);
  });

with result
{"successCount":1,"failureCount":0,"errors":[]}

Further verified with console and getUser method that user has been imported successfully.

@pragatimodi pragatimodi marked this pull request as draft November 14, 2023 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant