fix: 🐛 oidc retry not working for secure links in desktop ui (#2641)

* fix: 🐛 oidc retry not working for secure links in desktop ui
This commit is contained in:
Lisbet Alvarez authored and GitHub committed 2025-01-07 10:56:32 -08:00
1 parent 1cbf3b227e
commit f7f1041daa
6 files changed
+60 -14

No files matched your search

@@ -3,21 +3,34 @@
* SPDX-License-Identifier: BUSL-1.1
*/
import Controller from '@ember/controller';
import Controller, { inject as controller } from '@ember/controller';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
export default class ScopesScopeAuthenticateMethodOidcController extends Controller {
@controller('scopes/scope/authenticate/method/index') authenticateMethod;
// =services
@service session;
// =attributes
// =actions
/**
* Authentication URL for the pending OIDC flow, if any.
* @type {?string}
* Retry by starting a new OIDC authentication flow.
* @param {object} e
*/
get authURL() {
return this.session.data.pending.oidc.attributes.auth_url;
@action
async retryAuthentication(e) {
// TODO: This event handler can be removed when rose dialog gets
// refactored to use hds.
e.preventDefault();
const scope = this.authMethod.scope;
const authenticatorName = `authenticator:${this.authMethod.type}`;
await this.authenticateMethod.startOIDCAuthentication(authenticatorName, {
scope,
authMethod: this.authMethod,
});
}
}