简体   繁体   English

有什么方法可以从 android 工作室的代码中禁用 firebase 帐户

[英]is there is any way to disable firebase account from code in android studio

I'm creating an application which is going to be active for first 30 days and after that the user should get automatically log out from application itself (as user's account will be deactivated), or is there is any workaround for the same because I can disable accounts from Firebase Console but that doesn't affect any user if they remains logged In.我正在创建一个将在前 30 天内处于活动状态的应用程序,之后用户应该自动从应用程序本身注销(因为用户的帐户将被停用),或者是否有任何解决方法,因为我可以从 Firebase 控制台禁用帐户,但这不会影响任何用户,如果他们保持登录状态。

Mainly I wanted this for Android Studio, I can do the required method through Firebase Database itself but just wanted to know if there is any alternate method available.主要是我想要这个用于 Android Studio,我可以通过 Firebase 数据库本身执行所需的方法,但只是想知道是否有任何替代方法可用。

If you are asking how to disable a Firebase Authentication user account, that's not possible from within web or mobile application code.如果您询问如何禁用 Firebase 身份验证用户帐户,那在 web 或移动应用程序代码中是不可能的。 You can instead write backend code using the Firebase Admin SDK.您可以改为使用 Firebase Admin SDK 编写后端代码。

You can disable the account by updating the user and setting the disabled flag to true.您可以通过更新用户并将禁用标志设置为 true 来禁用该帐户 Or you can delete the account entirely if you are done with it.或者,您可以在完成后完全删除该帐户

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM