How to add data to ionic Auth during sign up


#1

Hi
I would like to add other data to ionic Auth during Signup to my application for example points = ‘0’ and number = "20273819’. Anyone know how to do it? Any help would be appreciated.

My signup code:

  function ($scope, $stateParams, $ionicAuth, $ionicUser, $state) {

$scope.data = {
    'name': '',
    'email': '',
    'password': '',
   
}

$scope.error='';

$scope.signup = function(){
    
    $scope.error = '';

    $ionicAuth.signup($scope.data).then(function() {
        // `$ionicUser` is now registered
        
        $ionicAuth.login('basic', $scope.data).then(function(){
         //this.user.set('points', '60');
          $state.go('tabsController.dashboardStudent');
        });
    }, function(err) {
        
        var error_lookup = {
            'required_number': 'Missing email field',
            'required_password': 'Missing password field',
            'conflict_number': 'A user has already signed up with that email',
            'conflict_username': 'A user has already signed up with that username',
        }    
    
        $scope.error = error_lookup[err.details[0]];
    });
}

}