File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
auth/src/main/java/com/firebase/ui/auth Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,13 @@ public void setAuthenticationCallback(IDPCallback callback) {
87
87
mIDPCallback = callback ;
88
88
}
89
89
90
+ public void disconnect () {
91
+ if (mGoogleApiClient != null ) {
92
+ mGoogleApiClient .disconnect ();
93
+ mGoogleApiClient = null ;
94
+ }
95
+ }
96
+
90
97
private IDPResponse createIDPResponse (GoogleSignInAccount account ) {
91
98
Bundle response = new Bundle ();
92
99
response .putString (TOKEN_KEY , account .getIdToken ());
Original file line number Diff line number Diff line change @@ -180,6 +180,18 @@ public void onClick(View view) {
180
180
}
181
181
}
182
182
183
+ @ Override
184
+ protected void onDestroy () {
185
+ super .onDestroy ();
186
+ if (mIdpProviders != null ) {
187
+ for (final IDPProvider provider : mIdpProviders ) {
188
+ if (provider instanceof GoogleProvider ) {
189
+ ((GoogleProvider ) provider ).disconnect ();
190
+ }
191
+ }
192
+ }
193
+ }
194
+
183
195
public static Intent createIntent (
184
196
Context context ,
185
197
FlowParameters flowParams ) {
You can’t perform that action at this time.
0 commit comments