# Elasticsearch-angular js authentication issue

**URL:** <https://discuss.elastic.co/t/elasticsearch-angular-js-authentication-issue/34411>\
**Category:** Elasticsearch\
**Created:** [November 12, 2015, 12:40pm UTC](https://discuss.elastic.co/t/elasticsearch-angular-js-authentication-issue/34411 "2015-11-12T12:40:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 14, 2015, 6:42pm UTC](https://discuss.elastic.co/t/elasticsearch-angular-js-authentication-issue/34411/2 "2015-11-14T18:42:40Z")

</div>

Answered in this thread:

> [@Elasticsearch-angular.js authentication issue](https://discuss.elastic.co/t/elasticsearch-angular-js-authentication-issue/34412):
>
> Hi, I am re-posting this here as there might be lot of UI developers here. I am using elasticsearch-angular.js client to connect to my ES instance which has custom security plugin installed. Below is the code i am using to make connection myServices.service('es', ['esFactory', function (esFactory, $http) { return esFactory({ host: '[http://esadmin:esadmin@localhost:9200](http://esadmin:esadmin@localhost:9200)', log: 'trace' }); }]); I have enabled cors in ES as below http.cors: enabled: true allow-origin: "/.\*/" allow-cre…

---

_[View the full topic](https://discuss.elastic.co/t/elasticsearch-angular-js-authentication-issue/34411)._
