上QQ阅读APP看书,第一时间看更新
Managing users
After onboarding users, there are many use cases to handle, for example, provider-specific user profile information such as updating the profile, sending a verification email, updating the password, deleting users, and so on. Let's understand them. In standard programming practice, we will check for the currently logged in user's details and if that returns null, then we ask the user to sign in:
FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
if (user != null) {
// When User is signed in
} else {
// When user is not signed in
}
Sometimes there could be a not null user object, in which case we need to check for the invalid token.