Firebase - Adding additional user data to separate DB
Initialization of firebase object was done for the old version, see this https://firebase.google.com/docs/web/setup , it uses
firebase.initializeApp(config)
instead ofnew firebase()
to update your database with user's additional fields use this code
firebase.database().ref('users/' + user.uid).set({ firstName: firstName, lastName: lastName })