title: cordova firebase google login - Login Error!! error: The redirect operation has been cancelled by the user before finalizing
body: <p>The sign in page opens and I log in with my Gmail id then it directs back to the app then shows this error. Not sure where I am missing. </p>
  
  <p>I have added only two js file for firebase.</p>
  
  <p>firebase-app.js
  firebase-auth.js</p>
  
  <pre><code>&lt;script&gt;
    // Initialize Firebase
    var configfirebase = {
      apiKey: "***********************",
      authDomain: "*****************.firebaseapp.com",
      databaseURL: "https://f*************.firebaseio.com",
      projectId: "************",
      storageBucket: "************",
      messagingSenderId: "**********",
    };
    firebase.initializeApp(configfirebase);
  &lt;/script&gt;
  
  
      var provider = new firebase.auth.GoogleAuthProvider();
  function firebaselogin() {
  
      firebase.auth().signInWithRedirect(provider).then(function() {
        return firebase.auth().getRedirectResult(); // never reach here.
      }).then(function(result) {
        var token = result.credential.accessToken;  // never reach here.
        var user = result.user;
        app.dialog.alert('Login success!! Welcome:' + result.user );
      }).catch(function(error) {
        // Handle Errors here.
        var errorCode = error.code;
        var errorMessage = error.message;
       app.dialog.alert('Login error!! error:' + errorMessage );
        // reach here and shows error.
      });
  
  
  }
  </code></pre>
  
  <p>I have read several post regarding same topic but none of them giving answer by using the default auth domain. Somebody has resolve by using custom domain but please help me with this.</p>
  
  <p><a href="https://i.stack.imgur.com/FaSz4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FaSz4.png" alt="enter image description here"></a></p>
  
  <p>List of cordova plugin I have</p>
  
  <p><code>
  cordova plugin list
  branch-cordova-sdk 2.6.24 "branch-cordova-sdk"
  cordova-plugin-add-swift-support 1.7.2 "AddSwiftSupport"
  cordova-plugin-browsertab 0.2.0 "cordova-plugin-browsertab"
  cordova-plugin-buildinfo 2.0.2 "BuildInfo"
  cordova-plugin-cocoapod-support 1.6.0 "Cordova CocoaPods Dependency Support"
  cordova-plugin-compat 1.2.0 "Compat"
  cordova-plugin-customurlscheme 4.3.0 "Custom URL scheme"
  cordova-plugin-facebook4 3.0.0 "Facebook Connect"
  cordova-plugin-firebase 2.0.2 "Google Firebase Plugin"
  cordova-plugin-firebase-auth-google 1.1.6 "Firebase Authentication"
  cordova-plugin-firebase-authentication 1.0.1 "cordova-plugin-firebase-authentication"
  cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
  cordova-plugin-whitelist 1.3.3 "Whitelist"
  cordova-spotify 0.5.0 "cordova-spotify"
  cordova-spotify-oauth 0.1.10 "cordova-spotify-oauth"
  cordova-support-android-plugin 1.0.1 "cordova-support-android-plugin"
  cordova-support-google-services 1.2.1 "cordova-support-google-services"
  cordova-universal-links-plugin 1.2.1 "Universal Links Plugin"
  </code></p>