2017-05-29 21:50:03 +03:00
|
|
|
import Configuration from 'ember-simple-auth/configuration';
|
2015-10-18 21:17:02 +03:00
|
|
|
import ENV from '../config/environment';
|
|
|
|
import ghostPaths from '../utils/ghost-paths';
|
|
|
|
import setupSession from 'ember-simple-auth/initializers/setup-session';
|
2018-02-20 15:43:15 +03:00
|
|
|
import setupSessionRestoration from 'ember-simple-auth/initializers/setup-session-restoration';
|
2015-10-18 21:17:02 +03:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'ember-simple-auth',
|
2015-10-28 14:36:45 +03:00
|
|
|
initialize(registry) {
|
2018-01-05 18:38:23 +03:00
|
|
|
let config = ENV['ember-simple-auth'] || {};
|
2019-01-08 15:36:16 +03:00
|
|
|
config.rootURL = ghostPaths().adminRoot;
|
2015-10-18 21:17:02 +03:00
|
|
|
Configuration.load(config);
|
|
|
|
|
|
|
|
setupSession(registry);
|
2018-02-20 15:43:15 +03:00
|
|
|
setupSessionRestoration(registry);
|
2015-10-18 21:17:02 +03:00
|
|
|
}
|
|
|
|
};
|