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
This commit is contained in:
Kevin Ansfield 2022-01-22 00:30:56 +00:00
parent 6b8e18af56
commit bb22fac227
2 changed files with 2 additions and 3 deletions

View File

@ -2,7 +2,6 @@ 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';
import setupSessionRestoration from 'ember-simple-auth/initializers/setup-session-restoration';
export default {
name: 'ember-simple-auth',
@ -12,6 +11,5 @@ export default {
Configuration.load(config);
setupSession(registry);
setupSessionRestoration(registry);
}
};

View File

@ -52,7 +52,8 @@ export default Route.extend(ShortcutsRoute, {
this.ui.initBodyDragHandlers();
},
beforeModel() {
async beforeModel() {
await this.session.setup();
return this.prepareApp();
},