I have been implementing a role system while working with firebase and AngularFire2. In the end I was able to achieve it. I could do it with parallel collections in the realTime database, but I had doubts.
I would like to know if it is possible (and if so, how it would be done) to directly update a user created by the Firebase authentication system.
Let's say that I create a user programmatically:
this.af.auth.createUser({ 'email': email, 'password': password })
.then(createdUser => {
...
createdUser['role'] = foo;
...... // Como puedo decirle a Firebase que actualice el usuario recién creado al nuevo objeto?
})
.catch(err => console.log(err))
The truth is more theoretical, but I would like to know if this can be done, either with AngularFire2 or directly with the native Firebase API.