How do I logout out of Google Sign In?
I know that I would be able to call mGoogleSignInClient.signOut(), but I create the mGoogleSignInClient in my login activity. How could I access it in my settings activity (where the logout happens)?
val gso = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken("id_token")
.requestEmail()
.build()
googleSignInClient = GoogleSignIn.getClient(this, gso)
In my settings activity, where I have the logout button, I want to be able to call some static method relating to the Google Sign-In SDK and logout.
Do I really need to repeat the steps above (which I implemented in my login activity) into my settings activity (where the logout button is)?