diff --git a/addons/auth/ember-cli-build.js b/addons/auth/ember-cli-build.js index ba0649dc9..48da19086 100644 --- a/addons/auth/ember-cli-build.js +++ b/addons/auth/ember-cli-build.js @@ -4,7 +4,10 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function (defaults) { let app = new EmberAddon(defaults, { - // Add options here + 'ember-simple-auth': { + // https://github.com/mainmatter/ember-simple-auth/blob/master/guides/upgrade-to-v4.md#call-sessionsetup-method-in-your-applicationroute + useSessionSetupMethod: true, + }, }); /* diff --git a/ui/admin/app/routes/application.js b/ui/admin/app/routes/application.js index ef413c97b..c10da153f 100644 --- a/ui/admin/app/routes/application.js +++ b/ui/admin/app/routes/application.js @@ -47,7 +47,8 @@ export default class ApplicationRoute extends Route { }); } - beforeModel() { + async beforeModel() { + await this.session.setup(); const theme = this.session.get('data.theme'); this.toggleTheme(theme); } diff --git a/ui/admin/ember-cli-build.js b/ui/admin/ember-cli-build.js index 475c97184..401b33588 100644 --- a/ui/admin/ember-cli-build.js +++ b/ui/admin/ember-cli-build.js @@ -8,6 +8,9 @@ module.exports = function (defaults) { 'ember-cli-babel': { includeExternalHelpers: true, }, + 'ember-simple-auth': { + useSessionSetupMethod: true, + }, babel: { sourceMaps: 'inline', }, diff --git a/ui/desktop/app/routes/application.js b/ui/desktop/app/routes/application.js index d274a56d7..5d9786bba 100644 --- a/ui/desktop/app/routes/application.js +++ b/ui/desktop/app/routes/application.js @@ -24,7 +24,8 @@ export default class ApplicationRoute extends Route { * reported by the main process. If they differ, update the main process * clusterUrl so that the renderer's CSP can be rewritten to allow requests. */ - beforeModel() { + async beforeModel() { + await this.session.setup(); const theme = this.session.get('data.theme'); this.toggleTheme(theme); return this.clusterUrl.updateClusterUrl(); diff --git a/ui/desktop/ember-cli-build.js b/ui/desktop/ember-cli-build.js index d66f1f5c0..426a30736 100644 --- a/ui/desktop/ember-cli-build.js +++ b/ui/desktop/ember-cli-build.js @@ -8,6 +8,9 @@ module.exports = function (defaults) { 'ember-cli-babel': { includeExternalHelpers: true, }, + 'ember-simple-auth': { + useSessionSetupMethod: true, + }, babel: { sourceMaps: 'inline', },