1
votes

I'm using the ember-cli-simple-auth with ember-cli and everything it working great, until I try and set a new host on DS.RESTAdapter application wide.

As soon as I set

// adapters/application.js
exports default DS.RESTAdapter.extend({
    host: 'https://api.example.com'
});

or even using reopen() it clears all the headers set by ember-simple-auth.

Am I not setting this up right in ember-cli?

1

1 Answers

2
votes

If you're using a different domain for the REST API you need to configure that for OAuth 2.0 authenticator (assuming you're using that) and also make sure you have CORS enabled on the server side. You can find a tutorial here: http://log.simplabs.com/post/90339547725/using-ember-simple-auth-with-ember-cli.