refactor: open and close oidc windows via window manager
This commit is contained in:
2 files changed
+6
-3
No files matched your search
@@ -11,7 +11,7 @@ export default class ScopesScopeAuthenticateMethodRoute extends Route {
|
||||
@service session;
|
||||
@service notify;
|
||||
@service intl;
|
||||
@service('browser/window') window;
|
||||
@service windowManager;
|
||||
|
||||
// =methods
|
||||
|
||||
@@ -41,7 +41,7 @@ export default class ScopesScopeAuthenticateMethodRoute extends Route {
|
||||
* @param {string} url
|
||||
*/
|
||||
openExternalOIDCFlow(url) {
|
||||
this.window.open(url);
|
||||
this.windowManager.open(url);
|
||||
}
|
||||
|
||||
// =actions
|
||||
|
||||
@@ -13,6 +13,7 @@ export default class ScopesScopeAuthenticateMethodOidcRoute extends Route {
|
||||
// =services
|
||||
|
||||
@service session;
|
||||
@service windowManager;
|
||||
|
||||
// =attributes
|
||||
|
||||
@@ -61,10 +62,12 @@ export default class ScopesScopeAuthenticateMethodOidcRoute extends Route {
|
||||
}
|
||||
|
||||
/**
|
||||
* When this route is deactivated (exited), stop polling for changes.
|
||||
* When this route is deactivated (exited), stop polling for changes and close
|
||||
* any windows opened via the window manager service.
|
||||
*/
|
||||
deactivate() {
|
||||
this.poller.cancelAll();
|
||||
this.windowManager.closeAll();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user