Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sign_in will not fetch the token #234

Closed
mattSpell opened this issue May 6, 2015 · 0 comments
Closed

sign_in will not fetch the token #234

mattSpell opened this issue May 6, 2015 · 0 comments

Comments

@mattSpell
Copy link

I'm using devise_token_auth with ng-token-auth and my user registration is working perfectly:
registration
The sign_out works perfectly:

sign_out

I try to login with the same email and password and it always returns 401:

sign_in

Here is my registrations controller (which works great):

angular.module("angDomino").controller "UserRegistrationsCtrl", [
  '$scope'
  '$auth'
  ($scope, $auth) ->
    $scope.handleRegBtnClick = ->
      $auth.submitRegistration $scope.registrationForm
      return
    return
  ]

Here's my sessions controller which does not work:

angular.module('angDomino').controller 'UserSessionsCtrl', [
  '$scope'
  ($scope) ->
    $scope.$on 'auth:login-error', (ev, reason) ->
      $scope.error = reason.errors[0]
      return
    return
]

Anybody have any wisdom as to why this is? Any help would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant