title: ng-token-auth Registration promise not resolving with rails
body: <p>I have managed to set up ng-token-auth with ionic(angular) and devise-token-auth with rails however when I create a User no error is logged in the rails console and the the user is created.</p>
  
  <p>The user is created in the database however I have designed the ionic user controller to login the user once the registration is complete by using a promise. The controller is below:</p>
  
  <pre><code>comeDineApp.controller('userController', ['ipCookie','$scope', '$state', '$auth',
  function(ipCookie, $scope, $state, $auth){
  
    $scope.handleRegBtnClick = function() {
      console.log("hello")
      $auth.submitRegistration($scope.registrationForm)
      .then(function() {
        console.log("welcome")
        $auth.submitLogin({
          email: $scope.registrationForm.email,
          password: $scope.registrationForm.password
        });
      });
    };
  }]);
  </code></pre>
  
  <p>In this case the submitLogin function doesn't execute as the promise is not resolved even though the user is successfully created in the DB.</p>
  
  <p>My rails user model is below:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    # Include default devise modules.
    devise :database_authenticatable, :registerable,
    :recoverable, :rememberable, :trackable, :validatable,
    :confirmable, :omniauthable
    include DeviseTokenAuth::Concerns::User
  
    has_many :tables
  
  before_save -&gt; do
    self.uid = SecureRandom.uuid
    skip_confirmation!
  end
  </code></pre>
  
  <p>end
  and my user controller is:</p>
  
  <pre><code>class UsersController &lt; ApplicationController
  
    before_action :authenticate_user!
    respond_to :json
  
    def show
      render json: current_user.tables
    end
  end
  </code></pre>
  
  <p>Any ideas how I can resolve this either in the rails or the angular so that  the angular promise resolves to login directly after signing up?</p>