func sign()

in ios/swift/FriendlyChatSwift/AppDelegate.swift [43:58]


  func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error?) {
    if let error = error {
      print("Error \(error)")
      return
    }

    guard let authentication = user.authentication else { return }
    let credential = GoogleAuthProvider.credential(withIDToken: authentication.idToken,
                                                      accessToken: authentication.accessToken)
    Auth.auth().signIn(with: credential) { (result, error) in
      if let error = error {
        print("Error \(error)")
        return
      }
    }
  }