Skip to content

Commit

Permalink
[iOS] Sign out of Google when signing out of Firebase. Resolves #353.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Alden committed Apr 5, 2020
1 parent 1f2fbc9 commit 9cd0c08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
* (Android): Don't display app icon for large notification icon on Android. Resolves [#343](https://github.com/dpa99c/cordova-plugin-firebasex/issues/343).
* (Android & iOS) Sign out of Google signing out of Firebase. Resolves [#353](https://github.com/dpa99c/cordova-plugin-firebasex/issues/353).

# Version 9.0.1
* Re-add Firebase Inapp Messaging SDK component to master branch.
Expand Down
7 changes: 7 additions & 0 deletions src/ios/FirebasePlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,13 @@ - (void)signOutUser:(CDVInvokedUrlCommand*)command {
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"No user is currently signed"] callbackId:command.callbackId];
return;
}

// Sign out of Google
if([[GIDSignIn sharedInstance] currentUser] != nil){
[[GIDSignIn sharedInstance] signOut];
}

// Sign out of Firebase
NSError *signOutError;
BOOL status = [[FIRAuth auth] signOut:&signOutError];
if (!status) {
Expand Down

0 comments on commit 9cd0c08

Please sign in to comment.