Skip to content

Commit

Permalink
ios return user when restorePreviousSignIn()
Browse files Browse the repository at this point in the history
  • Loading branch information
webdog-rich committed Apr 3, 2022
1 parent b184b02 commit 8b69e12
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ios/Plugin/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ public class GoogleAuth: CAPPlugin {
signInCall = call;
DispatchQueue.main.async {
if self.googleSignIn.hasPreviousSignIn() && !self.forceAuthCode {
self.googleSignIn.restorePreviousSignIn();
self.googleSignIn.restorePreviousSignIn() { user, error in
if let error = error {
self.signInCall?.reject(error.localizedDescription);
return;
}
self.resolveSignInCallWith(user: user!)
}
} else {
let presentingVc = self.bridge!.viewController!;

Expand Down

0 comments on commit 8b69e12

Please sign in to comment.