简体   繁体   English

卸载应用程序时 Flutter 注销用户

[英]Flutter sign out user when app is uninstalled

I want to sign out the user (using Firebase) when the app is deleted so the user is not already logged in when the app is reinstalled.我想在删除应用程序时注销用户(使用 Firebase),以便在重新安装应用程序时用户尚未登录。 Is there a way to achieve this?有没有办法实现这一目标?

What I would do is save a isFirstAppStartup in SharedPreferences.我要做的是在 SharedPreferences 中保存一个 isFirstAppStartup。 And if it is the first app startup then you just signout the user from firebase.如果这是第一次启动应用程序,那么您只需从 firebase 注销用户即可。

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

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