Use withCredential with $resource

To change the default settings of $http (hence $resource), you need to alter $httpProvider.

Set withCredentials globally like that:

angular.module('YOUR_APP')
    .config(function($httpProvider) {
        $httpProvider.defaults.withCredentials = true;
    });

The config withCredentials in $resource module is available in AngularJS 1.1.2+, you can get the new version and give it a try.


You can set it the flag globally with:

 $http.defaults.withCredentials = true;

This will affect all requests from the $resource module as well as the $http module.