         }
       case .signInWithCredential:
         getCredential() { credential in
-          Auth.auth().signIn(with: credential) { user, error in
+          Auth.auth().signInAndRetrieveData(with: credential) { authData, error in
             self.ifNoError(error) {
-              self.showAlert(title: "Signed In With Credential", message: user?.textDescription)
+              self.showAlert(title: "Signed In With Credential",
+                           message: authData?.user.textDescription)
             }
           }
         }

        }
      case .linkWithCredential:
        getCredential() { credential in
          self.user!.link(with: credential) { user, error in
            self.ifNoError(error) {
              self.showAlert(title: "Linked With Credential", message: user?.textDescription)
            }
          }
        }

        }
      case .reauthenticate:
        getCredential() { credential in
          self.user!.reauthenticateAndRetrieveData(with: credential) { authData, error in
            self.ifNoError(error) {
              if (authData?.user.uid != self.user?.uid) {
                let message = "The reauthenticated user must be the same as the original user"
                self.showAlert(title: "Reauthention error",
                             message: message)
                return
              }
              self.showAlert(title: "Reauthenticated", message: self.user?.textDescription)
            }
          }
