mirror of
https://github.com/friendica/friendica
synced 2025-04-26 09:50:15 +00:00
Improve 2 factor usage
This commit is contained in:
parent
f3de8d7764
commit
0223c030a9
20 changed files with 400 additions and 77 deletions
|
@ -24,6 +24,7 @@ namespace Friendica\Module\Settings\TwoFactor;
|
|||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPException\FoundException;
|
||||
use Friendica\Security\TwoFactor\Model\AppSpecificPassword;
|
||||
use Friendica\Security\TwoFactor\Model\RecoveryCode;
|
||||
use Friendica\Model\User;
|
||||
|
@ -90,7 +91,9 @@ class Index extends BaseSettings
|
|||
break;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
notice(DI::l10n()->t('Wrong Password'));
|
||||
if (!($e instanceof FoundException)) {
|
||||
notice(DI::l10n()->t($e->getMessage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -121,6 +121,7 @@ class Trusted extends BaseSettings
|
|||
'os' => $result->os->family,
|
||||
'device' => $result->device->family,
|
||||
'browser' => $result->ua->family,
|
||||
'trusted_labeled' => $trustedBrowser->trusted ? $this->t('Yes') : $this->t('No'),
|
||||
];
|
||||
|
||||
return $trustedBrowser->toArray() + $dates + $uaData;
|
||||
|
@ -135,7 +136,8 @@ class Trusted extends BaseSettings
|
|||
'$device_label' => $this->t('Device'),
|
||||
'$os_label' => $this->t('OS'),
|
||||
'$browser_label' => $this->t('Browser'),
|
||||
'$created_label' => $this->t('Trusted'),
|
||||
'$trusted_label' => $this->t('Trusted'),
|
||||
'$created_label' => $this->t('Created At'),
|
||||
'$last_used_label' => $this->t('Last Use'),
|
||||
'$remove_label' => $this->t('Remove'),
|
||||
'$remove_all_label' => $this->t('Remove All'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue