Skip to content

Commit

Permalink
alternative auth methods: switch back to smartlink tab fails
Browse files Browse the repository at this point in the history
Parent issue: sequentech/meta#222
  • Loading branch information
edulix committed Sep 4, 2023
1 parent 536d441 commit 2cb6d44
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions avRegistration/login-directive/login-directive.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@
<span ng-i18next="avRegistration.defaultAuthMethod"></span>
</a>
</li>
<!-- we disable click for smart-link unless it comes from a smart-link,
because it doesn't work -->
<li
ng-repeat="alt_auth_method in alternative_auth_methods"
ng-enabled="selectedAltMethod === 'smart-link' || alt_auth_method.auth_method_name !== 'smart-link'"
ng-class="{'active': current_alt_auth_method_id == alt_auth_method.id}"
>
<a ng-click="setCurrentAltAuthMethod(alt_auth_method)">
Expand Down
8 changes: 8 additions & 0 deletions avRegistration/login-directive/login-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,14 @@ angular.module('avRegistration')
return;
}

// smart link cannot be enabled if it doesn't come from the url
if (
scope.selectedAltMethod !== 'smart-link'
&& altAuthMethod === 'smart-link'
) {
return;
}

var authevent = angular.copy(scope.base_authevent);
if (altAuthMethod === null) {
scope.current_alt_auth_method_id = null;
Expand Down

0 comments on commit 2cb6d44

Please sign in to comment.