Skip to content

Instantly share code, notes, and snippets.

@alvincrespo
Created November 17, 2017 15:40
Show Gist options
  • Save alvincrespo/b764c74f417928c9c4e0094f86247b22 to your computer and use it in GitHub Desktop.
Save alvincrespo/b764c74f417928c9c4e0094f86247b22 to your computer and use it in GitHub Desktop.
Application Adapter with ember-simple-auth configuration
// auth-example-frontend/app/adapters/application.js
import JSONAPIAdapter from 'ember-data/adapters/json-api';
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';
import config from 'my-app/config/environment';
export default JSONAPIAdapter.extend(DataAdapterMixin, {
host: config.apiUrl,
namespace: config.apiNamespace,
authorizer: 'authorizer:application'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment