skip to Main Content

I have an app in flutter with firebase login, I provide the option to delete a regular user with email and password but how can I delete a user that signed in with Google, should I deal with it or tell them to go to google and remove my app if they want to get deleted? is it in Google play’s policy to enable this sort of functionality?

2

Answers


  1. You can delete the current user account by using below code.

    val user = Firebase.auth.currentUser!!
    
    user.delete()
        .addOnCompleteListener { task ->
            if (task.isSuccessful) {
                Log.d(TAG, "User account deleted.")
            }
        }
    
    Login or Signup to reply.
  2. Assuming you have already deleted the Firebase user by calling await FirebaseAuth.instance.currentUser?.delete();
    The next step will be to call await GoogleSignIn().disconnect(); with the Flutter Google SignIn plugin.

    This should disconnect the current user from the app, revoke previous authentication and remove the scopes that the user authorized earlier.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search