Skip to content
Pete Hamilton edited this page Aug 25, 2014 · 3 revisions

Angular Configuration Tips

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!

Clone this wiki locally