Ghost/ghost/admin/app/initializers/ember-simple-auth.js
Kevin Ansfield d51e25888d Resolved ember-simple-auth deprecations
no issue

- many "The automatic session initialization is deprecated" were shown in test output due to an old method of initializing the session service
- switched to explicit session setup in the application route's `beforeModel` hook
- https://github.com/simplabs/ember-simple-auth/issues/2314
2022-01-22 00:30:56 +00:00

16 lines
478 B
JavaScript

import Configuration from 'ember-simple-auth/configuration';
import ENV from '../config/environment';
import ghostPaths from '../utils/ghost-paths';
import setupSession from 'ember-simple-auth/initializers/setup-session';
export default {
name: 'ember-simple-auth',
initialize(registry) {
let config = ENV['ember-simple-auth'] || {};
config.rootURL = ghostPaths().adminRoot;
Configuration.load(config);
setupSession(registry);
}
};