Skip to content
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

Phone Authentication Issue #2538

Open
ksinghal opened this issue Apr 29, 2024 · 0 comments
Open

Phone Authentication Issue #2538

ksinghal opened this issue Apr 29, 2024 · 0 comments
Assignees

Comments

@ksinghal
Copy link

[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: Mac OS X Sonoma 14.4.1
  • Firebase SDK version: 12.1.0
  • Firebase Product: auth
  • Node.js version: 20.12.2
  • NPM version: 10.5.0

[REQUIRED] Step 3: Describe the problem

We are experiencing an issue where a specific phone number seems to be automatically "cleaned" in Firebase Auth. When we try a auth.createUser call with a specific Netherlands phone number "+310637225615" (attempted across multiple projects), it gets saved as "+31637225615". I am okay with this, but we replicate the phone number in Firestore and this is causing a data discrepancy. At the very least, I think we should be alerted that that this is occurring or that the phone number is invalid?

Steps to reproduce:

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

Simply initialize Firebase and get a reference to the auth object. Then run the following Javascript/typescript code:

authUser = await auth.createUser({
  uid: "some-user-id",
  phoneNumber: "+310637225615", // exactly this phone number
  displayName: "some display name",
  email: "some email"
});

Relevant Code:

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

Same code as above:

authUser = await auth.createUser({
  uid: "some-user-id",
  phoneNumber: "+310637225615", // exactly this phone number
  displayName: "some display name",
  email: "some email"
});
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