在用户删除其账户后 x 天后删除用户账户 – Firebase – React Native

huangapple go评论75阅读模式
英文:

Delete user account x days after user deletes their account - Firebase - React-native

问题

由于GDPR,应用程序必须允许用户从任何应用程序中删除他们的数据。一些应用程序允许用户删除他们的数据,但只有在过去30天内才能这样做。我已经能够在Firebase实时中删除用户的数据。

然而,我的应用程序有一个信用系统,目前用户可以无限次地使用他们的电子邮件删除和创建帐户以获得无限的信用,因为信用每天都会重置。因此,是否有办法在Firebase中实现一种方式,使得在一定数量的天数之后删除用户帐户?如果他们登录/创建帐户,他们会被阻止或者帐户删除会被停止,他们可以重新登录吗?

我尝试在网上寻找答案,但我只能找到在一定数量的天数之后删除数据,而不是用户身份验证数据。

提前感谢 :).

英文:

Because of GDPR, apps have to allow the user to delete their data from any app. Some apps allow users to delete their data but only does so once 30 days have passed. I have been able to delete the user's data in firebase live.

However, my application has a credit system, at the moment, user can delete and create an account with their email infinitely to gain unlimited credits because credits resets once a day. Therefore, is there a way something can be implemented in firebase for react-native to delete a user account after a certain number of days? And if they login/create an account they are blocked or the account deletion is stopped and they can log back in?

I tried looking for answers online, however all I could find was deleting data after a certain number of days but not user authentication data.

Thanks in advance :).

答案1

得分: 2

有没有办法在Firebase中为React Native实现一种方式,可以在一定天数后删除用户帐户?

没有现成的解决方案。您可以使用这篇文章中描述的技术来自行实现。它基于在后端执行的Cloud Functions。

如果他们登录/创建帐户后会被阻止吗?

您可以使用触发的阻止身份验证Cloud Function来实现这样的机制。您需要在某处存储(例如Firestore数据库)已删除其帐户的用户。

帐户删除是否会停止,以便他们可以重新登录?

我不太明白您的意思。您想要在哪些情况下避免删除?随时都可以吗?如果您提供更多详细信息,我将能够给出答案。

英文:

> Is there a way something can be implemented in firebase for
> react-native to delete a user account after a certain number of days?

There isn't any out-of-the-box solution. You can use the technique described in this article to implement it yourself. It is based on Cloud Functions which execute in the back-end.

> And if they login/create an account they are blocked?

You can use a Blocking Auth triggered Cloud Function to implement such a mechanism. You'll need to store somewhere (Firestore DB for example) the users that have already deleted their account.

> Or the account
> deletion is stopped and they can log back in?

I'm not sure to understand what you mean here. In which cases you want to avoid deletion? Anytime? If you update your question with more details I would be able to give an answer.

huangapple
  • 本文由 发表于 2023年7月23日 17:49:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/76747588.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定