File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
android/src/main/java/com/codetrixstudio/capacitor/GoogleAuth Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 3636import java .net .URL ;
3737import java .util .concurrent .ExecutorService ;
3838import java .util .concurrent .Executors ;
39+ import com .google .android .gms .tasks .OnSuccessListener ;
40+ import com .google .android .gms .tasks .OnFailureListener ;
3941
4042@ CapacitorPlugin ()
4143public class GoogleAuth extends Plugin {
@@ -140,8 +142,19 @@ public void refresh(final PluginCall call) {
140142
141143 @ PluginMethod ()
142144 public void signOut (final PluginCall call ) {
143- googleSignInClient .signOut ();
144- call .resolve ();
145+ googleSignInClient .signOut ()
146+ .addOnSuccessListener (getActivity (), new OnSuccessListener <Void >() {
147+ @ Override
148+ public void onSuccess (Void aVoid ) {
149+ call .resolve ();
150+ }
151+ })
152+ .addOnFailureListener (getActivity (), new OnFailureListener () {
153+ @ Override
154+ public void onFailure (Exception e ) {
155+ call .reject ("Sign out failed" , e );
156+ }
157+ });
145158 }
146159
147160 @ PluginMethod ()
You can’t perform that action at this time.
0 commit comments