Describe your environment
- Operating System version: Arch Linux
- Firebase SDK version: 9.5.0
- Firebase Product: Auth
- Node.js version: 14.15
- NPM version: 6.14.11
Describe the problem
The admin.auth().updateUser function does not allow me to add a second factor to an existing user, always triggering the error The second factor "uid" must be a valid non-empty string., the function expects a valid uid but according to the docs it should not, if no uid is informed it should auto generate one. Can anyone help me understand if this is a bug in the lib or am I doing something wrong?
Steps to reproduce:
- Create a user without any secondary factors.
- Try to add a new secondary factor using the
.updateUser function.
Relevant Code:
admin.auth().updateUser('123456789',{phoneNumber: '+16505550003',emailVerified: true,multiFactor: {enrolledFactors: [{phoneNumber: '+16505550003',displayName: 'Bender Bending Rodríguez',factorId: 'phone',},],},})
Describe your environment
Describe the problem
The
admin.auth().updateUserfunction does not allow me to add a second factor to an existing user, always triggering the errorThe second factor "uid" must be a valid non-empty string., the function expects a valid uid but according to the docs it should not, if no uid is informed it should auto generate one. Can anyone help me understand if this is a bug in the lib or am I doing something wrong?Steps to reproduce:
.updateUserfunction.Relevant Code: