Skip to content

Commit 96480f7

Browse files
authored
Merge pull request #7 from getjohn/master
Store-view-level config, and README update for integration with other modules
2 parents 6e75ca0 + 11ddbca commit 96480f7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Observer/TfaFrontendCheck.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function __construct(
8080
*/
8181
public function execute(\Magento\Framework\Event\Observer $observer)
8282
{
83-
if (!$this->config->getValue(self::ELGENTOS_AUTHENTICATOR_GENERAL_ENABLE)) {
83+
if (!$this->config->getValue(self::ELGENTOS_AUTHENTICATOR_GENERAL_ENABLE, \Magento\Store\Model\ScopeInterface::SCOPE_STORE)) {
8484
return $this;
8585
}
8686

@@ -117,7 +117,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
117117
*/
118118
public function getForced2faCustomerGroups()
119119
{
120-
$forced2faCustomerGroups = $this->config->getValue(self::ELGENTOS_AUTHENTICATOR_GENERAL_FORCED_GROUPS);
120+
$forced2faCustomerGroups = $this->config->getValue(self::ELGENTOS_AUTHENTICATOR_GENERAL_FORCED_GROUPS, \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
121121

122122
return array_filter(array_map('trim', explode(',', $forced2faCustomerGroups)));
123123
}

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ php bin/magento module:enable Neyamtux_Authenticator
1818
php bin/magento setup:upgrade
1919
```
2020

21+
## Integration with other authentication systems
22+
23+
To bypass the 2FA requirement for a specific logged in user, for example if you are using a Single Sign-On system for certain users,
24+
set this value in their customer session:
25+
26+
27+
```
28+
$customerSession->set2faSuccessful(true);
29+
```
30+
2131
## Screenshots
2232

2333
Setup page (in My Account)

0 commit comments

Comments
 (0)