# Ember-Simple-Auth

**URL:** <https://discuss.emberjs.com/t/ember-simple-auth/3454>\
**Category:** Uncategorized\
**Created:** [November 27, 2013, 12:02pm UTC](https://discuss.emberjs.com/t/ember-simple-auth/3454 "2013-11-27T12:02:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmejias](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jmejias/32/14994_2.png) [@jmejias](https://discuss.emberjs.com/u/jmejias)\
**Post date:** [November 27, 2013, 12:02pm UTC](https://discuss.emberjs.com/t/ember-simple-auth/3454/1 "2013-11-27T12:02:40Z")

</div>

Im trying to make a cors ember app with ember-simple-auth plugin and a basic rails setup. My ember app is on localhost:8000 and my rails api is on port 3000. Im following the examples and i keep getting this error:

XMLHttpRequest cannot load ‘[http://localhost:3000/api/session](http://localhost:3000/api/session)’. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘[http://localhost:8000](http://localhost:8000)’ is therefore not allowed access.

If anyone knows what this is or has a working rails 4 ember cors example i appreciate it.

---

<div class="post-metadata">

**Author:** ![shrikanth\_kr](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/shrikanth_kr/32/15297_2.png) [@shrikanth\_kr](https://discuss.emberjs.com/u/shrikanth_kr)\
**Post date:** [November 27, 2013, 12:08pm UTC](https://discuss.emberjs.com/t/ember-simple-auth/3454/2 "2013-11-27T12:08:24Z")

</div>

I think you can refer to this link [Access-Control-Allow-Origin](http://stackoverflow.com/questions/18944597/having-issues-with-access-control-allow-origin)

---

<div class="post-metadata">

**Author:** ![jmejias](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jmejias/32/14994_2.png) [@jmejias](https://discuss.emberjs.com/u/jmejias)\
**Post date:** [November 27, 2013, 12:24pm UTC](https://discuss.emberjs.com/t/ember-simple-auth/3454/3 "2013-11-27T12:24:50Z")

</div>

im not sure im following your recomendation

---

<div class="post-metadata">

**Author:** ![stravid](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/stravid/32/10138_2.png) [@stravid](https://discuss.emberjs.com/u/stravid)\
**Post date:** [November 28, 2013, 4:49pm UTC](https://discuss.emberjs.com/t/ember-simple-auth/3454/4 "2013-11-28T16:49:12Z")

</div>

This example application I built for our workshops doesn’t use authentication or Ember-Simple-Auth but it is running on a Ruby on Rails 4 backend with CORS. So if you are interested take a look:

[https://github.com/edgycircle/emberjs-workshop-oktober-2013](https://github.com/edgycircle/emberjs-workshop-oktober-2013)  
[https://github.com/edgycircle/emberjs-workshop-oktober-2013-api](https://github.com/edgycircle/emberjs-workshop-oktober-2013-api)

---

<div class="post-metadata">

**Author:** ![zigomir](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/zigomir/32/3716_2.png) [@zigomir](https://discuss.emberjs.com/u/zigomir)\
**Post date:** [December 1, 2013, 8:00am UTC](https://discuss.emberjs.com/t/ember-simple-auth/3454/5 "2013-12-01T08:00:41Z")

</div>

I recommend using [rack-cors gem](https://github.com/cyu/rack-cors) for this. It saved me a lot of funny code in my application controller 😉
