title: Angular6 Firebase Authentication with Email and Password
body: <p>Pls help me i am new in angular6 firebase programing.
  I have good working firebase auth system with email and password. But from registration i can only get uid and email when i store User in database. I red about updateProfile but dont know how to implement in my code. <strong>I am using "@angular/fire": "^5.0.0",
  "firebase": "^5.5.1",</strong> so i am asking is this version good or i need to change.
  Back to question: Service:</p>
  
  <pre><code> import { Injectable } from "@angular/core";
      import { AngularFireAuth } from "@angular/fire/auth";
      import {
        AngularFirestore,
        AngularFirestoreCollection,
        AngularFirestoreDocument
      } from "@angular/fire/firestore";
      import { Observable } from "rxjs";
      import "rxjs/add/operator/map";
  
      @Injectable()
      export class AuthService {
        constructor(private afAuth: AngularFireAuth, private db: AngularFirestore) {
          // this.afAuth.authState.subscribe(auth =&gt; console.log(auth));
        }
  
        login(email: string, password: string) {
          return new Promise((resolove, reject) =&gt; {
            this.afAuth.auth
              .signInWithEmailAndPassword(email, password)
              .then(userData =&gt; resolove(userData), err =&gt; reject(err));
          });
        }
        getAuth() {
          return this.afAuth.authState.map(auth =&gt; auth);
        }
        logout() {
          this.afAuth.auth.signOut();
        }
        register(email: string, password: string) {
          return new Promise((resolove, reject) =&gt; {
            this.afAuth.auth
              .createUserWithEmailAndPassword(email, password)
              .then(userData =&gt; resolove(userData), err =&gt; reject(err));
          });
        }
      }
  </code></pre>
  
  <p><strong>Component</strong></p>
  
  <pre><code>import { Component, OnInit } from "@angular/core";
  import { AuthService } from "../../service/auth.service";
  import { Router } from "@angular/router";
  
  @Component({
    selector: "app-register",
    templateUrl: "./register.component.html",
    styleUrls: ["./register.component.css"]
  })
  export class RegisterComponent implements OnInit {
    email: string;
    password: string;
    constructor(private authService: AuthService, private router: Router) {}
  
    ngOnInit() {}
  
    onSubmit() {
      this.authService
        .register(this.email, this.password)
        .then(res =&gt; {
          this.router.navigate(["/"]);
        })
        .catch(err =&gt; console.log(err.message));
    }
  }
  </code></pre>
  
  <p>My goal is to have displayName and skill as property of User in database. After registration with my code displayName is null. So my question is how to store displayName in database?
  Ty
  Viktor.</p>