Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Firebase Auth: Phone number validation fail with E.164 valid number

Open
#2,770 0 comments 0 reactions 1 assignee View on GitHub

@Xiaoshouzi-gh is already working on this.

Since Nov 20, 2024.

Assessment

This issue has not been assessed yet.

Description

api: auth
[READ] Step 1: Are you in the right place?
  • For issues related to the code in this repository file a Github issue.
  • If the issue pertains to Cloud Firestore, read the instructions in the "Firestore issue"
    template.
  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.
[REQUIRED] Step 2: Describe your environment
  • Operating System version: all
  • Firebase SDK version: 11.5.0
  • Firebase Product: auth
  • Node.js version: 20
  • NPM version: 10.7.0
[REQUIRED] Step 3: Describe the problem

When we want to create a user or edit an existing user's phone number, there response is:
{
"code": "auth/invalid-phone-number",
"message": "TOO_SHORT"
}
if we use this phone number: +60 6-850 5555

Steps to reproduce:

Just try to create a user with that particular number or update an existing one's phone number.

Relevant Code:
// TODO(you): code here to reproduce the problem

const admin = require('firebase-admin');
admin.initializeApp({
credential: admin.credential.applicationDefault() // Or use admin.credential.cert with a path to your service account key
});
const auth = admin.auth();
try {
const userRecord = await admin.auth().createUser({
phoneNumber: "+6068502555",
});
console.log("Successfully created new user:", userRecord.uid);
} catch (error) {
console.error("Error creating new user:", error);
}

Dominant language
TypeScript
Stars
1.7k
Forks
419
Avg merge
4d 20h
Merged PRs (30d)
16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/firebase-admin-node

All issues in firebase/firebase-admin-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.