title: Firebase Authentication "auth/invalid-email" and "The email address is badly formatted."
body: <p>I am trying to implement Firebase login/registration into my app using Angular and Ionic 4. I have the registration of my account working and forgetting the password working I can see the accounts in my firebase console. The issue I am having is when I try to log into that account I created. In the developer console I get <a href="https://imgur.com/a/WzRiwtn" rel="nofollow noreferrer">https://imgur.com/a/WzRiwtn</a> :</p>
  
  <pre><code>code: "auth/invalid-email"
  message: "The email address is badly formatted."
  </code></pre>
  
  <p>Its saying the issue lies in my tab3.page.ts:22</p>
  
  <p>Here is the code from that page </p>
  
  <pre><code>import { Component } from '@angular/core';
  import { AlertController } from '@ionic/angular';
  import { LoadingController, ToastController } from '@ionic/angular';
  import { Router } from '@angular/router';
  import { AngularFireAuth } from '@angular/fire/auth';
  
  @Component({
    selector: 'app-tab3',
    templateUrl: 'tab3.page.html',
    styleUrls: ['tab3.page.scss']
  })
  export class Tab3Page {
    email: string = '';
    password: string = '';
    error: string = '';
    constructor(private fireauth: AngularFireAuth,
      private router: Router,
      private toastController: ToastController,
      public loadingController: LoadingController,
      public alertController: AlertController) {
  
    }
  
  
    async openLoader() {
      const loading = await this.loadingController.create({
        message: 'Please Wait ...',
        duration: 2000
      });
      await loading.present();
    }
    async closeLoading() {
      return await this.loadingController.dismiss();
    }
  
    login() {
      this.fireauth.auth.signInWithEmailAndPassword(this.email, this.password)
        .then(res =&gt; {
          if (res.user) {
            console.log(res.user);
            this.router.navigate(['/home']);
          }
        })
        .catch(err =&gt; {
          console.log(`login failed ${err}`);
          this.error = err.message;
        });
    }
  
    async presentToast(message, show_button, position, duration) {
      const toast = await this.toastController.create({
        message: message,
        showCloseButton: show_button,
        position: position,
        duration: duration
      });
      toast.present();
    }
  
  }
  </code></pre>
  
  <p>I have been staring at this since Friday trying multiple different methods and guides online and every method I try I am getting this error any help would be VERY much appreciated. This code came from following this <a href="https://enappd.com/blog/email-authentication-with-firebase-in-ionic-4/38/" rel="nofollow noreferrer">https://enappd.com/blog/email-authentication-with-firebase-in-ionic-4/38/</a> tutorial and even looking at his github and following it exactly I still come to this issue.</p>