Android, Firebase Auth, user session still exists when user deletes and reinstall app

那年仲夏 提交于 2019-12-29 09:11:07

问题


In my first launching activity there is lines of code that checks if user is logged in by Firebase:

    if (mAuth.getCurrentUser() != null) {
                startActivity(new Intent(SplashActivity.this, MenuActivity.class));
                finish();
    }
    else 
    {

                startActivity(new Intent(SplashActivity.this, LoginActivity.class));
                finish();
    }

If user is logged in I open MenuActivity if not then LoginActivity

In my LoginActivity I authorize with signInWithCredential.

I have found one interesting problem.

When user deletes application then reinstalls it from Google Play and launches it user is still logged in and opens MenuActivity

I have found similar question but with iOS version.

Is it feature of Firebase? How it is possible to invalidate user session when user deletes application?


回答1:


Firebase support answered me and yes Firebase tries to keep some data even if appliaction is deleted.

In order to clear data when deleteing, I needed to disable backuping in my applications manifest in application:

android:allowBackup="false"
android:fullBackupContent="false"


来源:https://stackoverflow.com/questions/44042337/android-firebase-auth-user-session-still-exists-when-user-deletes-and-reinstal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!