forked from cloudspace/angular_devise
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Pete Hamilton edited this page Aug 25, 2014
·
3 revisions
By default angular won't include credentials in subsequent requests once you've logged in. You need to turn this on with:
.config([
'$httpProvider',
function($httpProvider) {
$httpProvider.defaults.withCredentials = true;
}
])
Before this, I found angular repeatedly auth-ing my application and then immediately sending requests which bounced with 401: unauthorised responses. Hope it helps someone!