Firebase Firestore更改电话号码

发布于 2025-01-21 15:04:22 字数 735 浏览 1 评论 0原文

我已经与Firebase合作了一年多。今天,我进行了一些测试,突然,Firebase立即将电话号码更改为随机数。我想将电话号码作为字符串保存到Firestore中,但是每次更新Firestore的文档时,电话号码字符串都会将其转换为随机数。

有人可以向我解释吗?是因为GDPR还是隐私的东西?

在更新文档之前:

“在更新文档之前”

更新DOC(输入:06601234567)后,它成为一个随机数(71032704):

“我的nuxt应用中的电话号码”

我正在进行NUXT项目。

I have been working with Firebase for over a year now. Today I did some testing and suddenly, Firebase changes phone numbers instantly to random numbers. I want to save the phone number as a string into Firestore, but everytime I update the Document of the Firestore, the phone number String is converted into a random number.

Can someone explain this to me? Is it becaue of the GDPR or privacy stuff?

Before updating the Doc:

before updating the document

After updating the Doc (input: 06601234567) , it becomes a random number (71032704):

phone number in my Nuxt app
after updating the Doc

I am working on a Nuxt Project.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧时浪漫 2025-01-28 15:04:22

更新:我在更新的函数中实现了错误的方法。如果没有用户的输入,我想将TelefonNummer字段设置为NULL。显然,它没有用。

  await updateDoc(doc(db, 'test', userid), {

              //Input: 066012345678

              // Firestore --> -77123412
              telefonnummer: this.telefonnummer | null,

              // Firestore --> 066012345678 --> nice
              telefonnummer: this.telefonnummer,

Update: I implemented a wrong way of nullchecking in my updateDoc function. I wanted to set the telefonnummer field to null, if there was no input from the user. Apparently, it didn't work.

  await updateDoc(doc(db, 'test', userid), {

              //Input: 066012345678

              // Firestore --> -77123412
              telefonnummer: this.telefonnummer | null,

              // Firestore --> 066012345678 --> nice
              telefonnummer: this.telefonnummer,
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文