firebase / firebase/firebase-admin-node
Phone Authentication Issue
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 419
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 16
Description
### [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](http://stackoverflow.com/)
with the firebase tag.
* For general Firebase discussion, use the [firebase-talk](https://groups.google.com/forum/#!forum/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](https://firebase.google.com/support/).
### [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"
});
```
Contributor guide
Assessment
This issue has not been assessed yet.