I'm getting the error: Circular dependency found: $http <- Auth <- $http <- Me.
This happens when I add Auth factory to my $httpProvider.interceptors as a dependency. I need to use Auth there for token refresh.
I do not understand the issue enough to fix it (despite reading this post and Miško Hevery's blog post... namely not sure how class C was introduced to the mix, but think it's somehow related to my Me dependency)
app.js:
.config([
...
$httpProvider.interceptors.push(['Auth',...
Auth.refreshToken();
Auth.js:
angular.module('DDE')
.factory('Auth', ['$http', function($http) {
Me.js:
angular.module('DDE')
.factory('Me', ['$http', 'Auth', function($http, Auth) {