File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed
auth/app/src/main/java/com/google/firebase/quickstart/auth Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -154,11 +154,8 @@ private void firebaseAuthWithGoogle(String idToken) {
154
154
}
155
155
// [END auth_with_google]
156
156
157
- // [START sign_out]
158
- private void signOut () {
159
- // Firebase sign out
160
- mAuth .signOut ();
161
-
157
+ // [START clear_credential_stage]
158
+ private void clearCredentialState () {
162
159
// When a user signs out, clear the current user credential state from all credential providers.
163
160
ClearCredentialStateRequest clearRequest = new ClearCredentialStateRequest ();
164
161
credentialManager .clearCredentialStateAsync (
@@ -177,7 +174,7 @@ public void onError(@NonNull ClearCredentialException e) {
177
174
}
178
175
});
179
176
}
180
- // [END sign_out ]
177
+ // [END clear_credential_stage ]
181
178
182
179
private void updateUI (FirebaseUser user ) {
183
180
Original file line number Diff line number Diff line change @@ -125,11 +125,8 @@ class GoogleSignInActivity : AppCompatActivity() {
125
125
}
126
126
// [END auth_with_google]
127
127
128
- // [START sign_out]
129
- private fun signOut () {
130
- // Firebase sign out
131
- auth.signOut()
132
-
128
+ // [START clear_credential_stage]
129
+ private fun clearCredentialState () {
133
130
// When a user signs out, clear the current user credential state from all credential providers.
134
131
lifecycleScope.launch {
135
132
try {
@@ -141,7 +138,7 @@ class GoogleSignInActivity : AppCompatActivity() {
141
138
}
142
139
}
143
140
}
144
- // [END sign_out ]
141
+ // [END clear_credential_stage ]
145
142
146
143
private fun updateUI (user : FirebaseUser ? ) {
147
144
}
You can’t perform that action at this time.
0 commit comments