title: How To redirect to home page after login with google using firebase in ionic3
body: <p>I want to redirect to home page after login with google and facebook using firebase in ionic3.</p>
  
  <p>When user click google icons or facebook icons, then they redirect to the ionic app and go to <code>home.html</code> page</p>
  
  <p>Redirecting from google or facebook to ionic app is working well and it shows login page, But I want to show <code>home.html</code> page</p>
  
  <p>Here I share my codes</p>
  
  <p><code>login.ts</code></p>
  
  <p><b>Facebook login</b></p>
  
  <pre><code>        loginfb() {
         this.facebook.login(['email']).then((response) =&gt; {
        const facebookCredential = firebase.auth.FacebookAuthProvider
          .credential(response.authResponse.accessToken);
  
      firebase.auth().signInWithCredential(facebookCredential)
          .then((success) =&gt; {
              console.log("Firebase success: " + JSON.stringify(success));
              this.userProfile = success;
              this.navCtrl.setRoot(HomePage);
          })
          .catch((error) =&gt; {
              console.log("Firebase failure: " + JSON.stringify(error));
          });
  
  }).catch((error) =&gt; {
      console.log(error)
  });
  }
  </code></pre>
  
  <p><b>Google login</b></p>
  
  <pre><code> logingoogle() {
    this.googlePlus.login({
        'webClientId': 'xxxxx',
        'offline': true
    }).then(res =&gt; {
        firebase.auth()
            .signInWithCredential(firebase.auth.GoogleAuthProvider.credential(res.idToken))
            .then(success =&gt; {
                console.log("Firebase success: " + JSON.stringify(success));
                this.navCtrl.setRoot(HomePage);
            })
            .catch(error =&gt; console.log("Firebase failure: " +
                JSON.stringify(error)));
    }).catch(err =&gt; console.error("Error: ", err));
    }
  </code></pre>