Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
edulix committed Nov 12, 2023
1 parent 14cf8c1 commit dae8895
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions avRegistration/login-directive/login-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ angular.module('avRegistration')
// Gets the list of current auth method providers
function getCurrentOidcProviders(auth_event)
{
if (
!auth_event.auth_method_config ||
auth_event.auth_method_config.config.provider_ids
) {
return [];
}
return _.map(
auth_event.auth_method_config.config.provider_ids,
function (provider_id) {
Expand Down
5 changes: 2 additions & 3 deletions dist/appCommon-v10.0.2.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,12 +634,11 @@ angular.module("avRegistration").config(function() {}), angular.module("avRegist
}, scope.apply = function(authevent) {
var auth_event;
scope.hasOtpFieldsCode = Authmethod.hasOtpCodeField(authevent), scope.method = authevent.auth_method,
scope.oidc_providers = authevent.oidc_providers, scope.current_oidc_providers = (auth_event = authevent,
_.map(auth_event.auth_method_config.config.provider_ids, function(provider_id) {
scope.oidc_providers = authevent.oidc_providers, scope.current_oidc_providers = !(auth_event = authevent).auth_method_config || auth_event.auth_method_config.config.provider_ids ? [] : _.map(auth_event.auth_method_config.config.provider_ids, function(provider_id) {
return _.find(auth_event.oidc_providers, function(provider) {
return provider.public_info.id === provider_id;
});
})), (scope.hasOtpFieldsCode || _.contains([ "sms-otp", "email-otp" ], scope.method)) && (scope.skipSendAuthCode = scope.successfulRegistration),
}), (scope.hasOtpFieldsCode || _.contains([ "sms-otp", "email-otp" ], scope.method)) && (scope.skipSendAuthCode = scope.successfulRegistration),
scope.name = authevent.name, scope.parseAuthToken(), scope.registrationAllowed = "open" === authevent.census && (autheventid !== adminId || ConfigService.allowAdminRegistration),
scope.isCensusQuery || scope.withCode || scope.isOtl ? scope.withCode ? scope.login_fields = Authmethod.getLoginWithCode(authevent) : scope.isCensusQuery ? scope.login_fields = Authmethod.getCensusQueryFields(authevent) : scope.isOtl && (scope.login_fields = Authmethod.getOtlFields(authevent)) : scope.login_fields = Authmethod.getLoginFields(authevent),
scope.login_fields.sort(function(a, b) {
Expand Down

0 comments on commit dae8895

Please sign in to comment.