Redirecting the user after finishing a certain page

I’m confused on how to redirect user while on login


-> After filling up login details and submitting, the user is redirected to an examination test. After Filling it up, the user will now then be redirected to the home page. When the user decides to log out, and then login back again, the user must be redirected to the home page.

I’m planning on my auth.ts, upon the first login, on my firebase, I will set a checker like 1’s(If user is done with the test) and 0’s (If user is not done with the test)

  |_Checker:"1/0" // Either 1 or 0

Below is the code for the Login:

loginUser() {
if (!this.loginForm.valid) {
} else {
  this.authData.loginUser(, this.loginForm.value.password)
    .then(authData => {
      //if user is done with the test

    }, error => {
      this.loading.dismiss().then(() => {
        let alert = this.alertCtrl.create({
          message: error.message,
          buttons: [
              text: "Ok",
              role: 'Cancel'


 loginUser(newEmail: string, newPassword: string): firebase.Promise<any> {
return this.afAuth.auth.signInWithEmailAndPassword(newEmail, newPassword)
   .then(newUser => {
    const x = this.afAuth.auth.currentUser.uid;

    if (x != null) {
        email: newEmail,
    } else {

Here you can get a very good tutorial about auth with firebase.

I think also the answer to your question is given in this tutorial.