witoldsz / angular-http-auth

MIT License
2.38k stars 417 forks source link

No longer works with 1.3 angular #81

Closed GitHubish closed 9 years ago

GitHubish commented 9 years ago

I feel that the auth interceptor no longer works with the latest version of angular (1.3) There has been beaking exchange on $http : API interceptors changed

On my app I can no longer connect . But there is no error in the console.

witoldsz commented 9 years ago

That's strange, I have just checked https://github.com/angular/angular.js/blob/master/CHANGELOG.md#130-superluminal-nudge-2014-10-13 and I can see no description of changes of intercepror API in 1.3. I will check it anyway.

GitHubish commented 9 years ago

Excuse me information about breaking changes may be wrong. My source (http://ng-learn.org/2014/06/Migration_Guide_from_1-2_to1-3/) indicates that information but seems to have contradicted.

"$http: interceptors API changed -> https://docs.angularjs.org/api/ng/service/$http#interceptors"

But here https://docs.angularjs.org/guide/migration it seems that there are changes on $http. (see example with myHttpInterceptor)

Thanks

witoldsz commented 9 years ago

So the breaking change in 1.3 is that the old, deprecated API for interceptors has been removed. The angular-http-auth does not use the old API in 1.2.x releases (and master branch). Maybe you are using the 1.0.x one? Check this out for reference: https://github.com/witoldsz/angular-http-auth/releases

GitHubish commented 9 years ago

Indeed you are right for that deprecated API for interceptors has-been removed

Otherwise, I use the latest version of your angular-http-auth module for angular 1.2.26. If I put angular 1.3, everything works ... except login.

I'll see if I can debug find information about the reason.

dotnetwise commented 9 years ago

+1

witoldsz commented 9 years ago

I am sorry for not responding. This is very tight time at work, we are at the edge of the milestone of the project, so I have not time for this at the (very) moment. If someone could update the demo page http://witoldsz.github.io/angular-http-auth/ so it would use Angular 1.3 with most recent http-auth module, it would help a lot figuring out what's wrong.

sebastiaanluca commented 9 years ago

Seems to work here though. Using AngularJS 1.3.2 and installed angular-http-auth via Bower, so version 1.2.2.

Package gracefully intercepts non-auth requests, buffers them, and tries them again when I call loginConfirmed().

renatomefi commented 9 years ago

Working here too.

Should this issue still be opened?

zoltanradics commented 9 years ago

I think, it is no more relevant.

witoldsz commented 9 years ago

OK, so I am closing the issue.

genuinefafa commented 9 years ago

If it works, then... Should we update README.md accordingly?

witoldsz commented 9 years ago

@genuinefafa Good idea, I'm waiting forward for a pull request :)