Skip to content

Can't create user with phoneNumber: null #1508

Closed
@gustavopch

Description

@gustavopch

Describe your environment

  • Operating System version: macOS Monterey 12.0.1
  • Firebase SDK version: 9.10.0
  • Firebase Product: auth
  • Node.js version: 12.22.3
  • NPM version: 6.14.13

Describe the problem

I receive the following error when creating a user with phoneNumber: null:

FirebaseAuthError: The phone number must be a non-empty E.164 standard compliant identifier string.

But the function params say it should be allowed:

phoneNumber?: string | null;

Steps to reproduce:

Run the code below.

Relevant Code:

import firebase from 'firebase-admin'

await firebase.auth().createUser({
  displayName: 'John',
  email: 'john@example.com',
  phoneNumber: null,
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions