You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue with device_token_auth v0.1.34, where I get a 404 User not found when I do an update in the RegistrationsController. For the client side I use ng-token-auth v0.0.28.
When I look at the method set_user_by_token in the set_user_by_token.rb concern, then I see that the expression "user.valid_token?(@token, @client_id)" on line 54 evaluates to false. I do see however that the request headers include a token and client that correspond to the values of the client and token at that point in the set_user_by_token method.
Now the weird thing is that as part of my login procedure, I also perform an update to update the user object with a field that I get from an external resource. This first update works just fine in all cases.
Another thing is that these updates work fine for the first user I login with, but then when I log out and authenticate with another user then everything works smooth until I try to update.
Any ideas what might be going on? Is this a bug or am I doing something wrong here?
Thanks!
The text was updated successfully, but these errors were encountered:
Mea culpa! I had forgotten to remove the $http.get option {withCredentials: true} that had been there before I added ng-token-auth. Closing this issue.
As I wrote in the comment above, I made the mistake of leaving in the {withCredentials: true} option for my $http.get calls after starting to work with ng-token-auth. Once I removed that option it started to work.
I have an issue with device_token_auth v0.1.34, where I get a 404 User not found when I do an update in the RegistrationsController. For the client side I use ng-token-auth v0.0.28.
When I look at the method set_user_by_token in the set_user_by_token.rb concern, then I see that the expression "user.valid_token?(@token, @client_id)" on line 54 evaluates to false. I do see however that the request headers include a token and client that correspond to the values of the client and token at that point in the set_user_by_token method.
Now the weird thing is that as part of my login procedure, I also perform an update to update the user object with a field that I get from an external resource. This first update works just fine in all cases.
Another thing is that these updates work fine for the first user I login with, but then when I log out and authenticate with another user then everything works smooth until I try to update.
Any ideas what might be going on? Is this a bug or am I doing something wrong here?
Thanks!
The text was updated successfully, but these errors were encountered: