From 18d82c1770f49473b554d4f45e14ed477095aa1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Robles?= Date: Wed, 15 May 2024 19:34:37 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Can't=20login=20on=20alt=20auth?= =?UTF-8?q?=20method=20with=20openid=20as=20main=20(#395)=20(#396)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parent issue: https://github.com/sequentech/meta/issues/913 --- avRegistration/login-directive/login-directive.js | 1 + dist/appCommon-vmaster.js | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/avRegistration/login-directive/login-directive.js b/avRegistration/login-directive/login-directive.js index 5ae7af7a..777057d2 100644 --- a/avRegistration/login-directive/login-directive.js +++ b/avRegistration/login-directive/login-directive.js @@ -848,6 +848,7 @@ angular.module('avRegistration') return; } + scope.isOpenId = altAuthMethod.auth_method === 'openid-connect'; scope.current_alt_auth_method_id = altAuthMethod.id; authevent.extra_fields = altAuthMethod.extra_fields; authevent.auth_method_config = altAuthMethod.auth_method_config; diff --git a/dist/appCommon-vmaster.js b/dist/appCommon-vmaster.js index b569cbc5..77abe9fc 100644 --- a/dist/appCommon-vmaster.js +++ b/dist/appCommon-vmaster.js @@ -666,9 +666,10 @@ angular.module("avRegistration").config(function() {}), angular.module("avRegist var authevent = angular.copy(scope.base_authevent); if (null === altAuthMethod) return scope.current_alt_auth_method_id = null, scope.isOpenId = scope.isOpenId || "openid-connect" === authevent.auth_method, void scope.apply(authevent); - altAuthMethod.id !== scope.current_alt_auth_method_id && (isClick && "smart-link" !== scope.selectedAltMethod && "smart-link" === altAuthMethod.auth_method_name || (scope.current_alt_auth_method_id = altAuthMethod.id, - authevent.extra_fields = altAuthMethod.extra_fields, authevent.auth_method_config = altAuthMethod.auth_method_config, - authevent.auth_method = altAuthMethod.auth_method_name, scope.apply(authevent))); + altAuthMethod.id !== scope.current_alt_auth_method_id && (isClick && "smart-link" !== scope.selectedAltMethod && "smart-link" === altAuthMethod.auth_method_name || (scope.isOpenId = "openid-connect" === altAuthMethod.auth_method, + scope.current_alt_auth_method_id = altAuthMethod.id, authevent.extra_fields = altAuthMethod.extra_fields, + authevent.auth_method_config = altAuthMethod.auth_method_config, authevent.auth_method = altAuthMethod.auth_method_name, + scope.apply(authevent))); }, scope.apply = function(authevent) { scope.hasOtpFieldsCode = Authmethod.hasOtpCodeField(authevent), scope.method = authevent.auth_method, scope.oidc_providers = authevent.oidc_providers, scope.current_oidc_providers = getCurrentOidcProviders(authevent),