2015-10-18 21:17:02 +03:00
|
|
|
import ENV from '../config/environment';
|
|
|
|
import ghostPaths from '../utils/ghost-paths';
|
|
|
|
import Configuration from 'ember-simple-auth/configuration';
|
|
|
|
import setupSession from 'ember-simple-auth/initializers/setup-session';
|
|
|
|
import setupSessionService from 'ember-simple-auth/initializers/setup-session-service';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'ember-simple-auth',
|
2015-10-28 14:36:45 +03:00
|
|
|
initialize(registry) {
|
|
|
|
let config = ENV['ember-simple-auth'] || {};
|
2015-10-18 21:17:02 +03:00
|
|
|
config.baseURL = ghostPaths().adminRoot;
|
|
|
|
Configuration.load(config);
|
|
|
|
|
|
|
|
setupSession(registry);
|
|
|
|
setupSessionService(registry);
|
|
|
|
}
|
|
|
|
};
|