A way for a user to create other users?


#1

Im working on an app for my final year project in college, but im currently having issues that im not sure how to work around, namely, i will have users which can create other users, there will also be references to these users in a firebase database, im having trouble gettin a new users id on signup as this will be the key for the new users reference in the database

signUpClient(email: string, password: string, name: string): any {
    var clientId: any;
    let details: UserDetails = {'email': email, 'password': password};
    //Create client
    this.newClient = this.auth.signup(details).then(() => {
      console.log(email);
      console.log(password);
      console.log("random test");
      clientId =  this.newClient.id;
      console.log(clientId);

    });

    return this.newClient;

when this.newClient.id is undefined?