- Also hard-set TOTP algorithm with comment from testing others.
use BaconQrCode\Renderer\RendererStyle\RendererStyle;
use BaconQrCode\Writer;
use PragmaRX\Google2FA\Google2FA;
+use PragmaRX\Google2FA\Support\Constants;
class TotpService
{
public function __construct(Google2FA $google2fa)
{
$this->google2fa = $google2fa;
+ // Use SHA1 as a default, Personal testing of other options in 2021 found
+ // many apps lack support for other algorithms yet still will scan
+ // the code causing a confusing UX.
+ $this->google2fa->setAlgorithm(Constants::SHA1);
}
/**
* [OneLogin's SAML PHP Toolkit](https://github.com/onelogin/php-saml)
* [League/CommonMark](https://commonmark.thephpleague.com/)
* [League/Flysystem](https://flysystem.thephpleague.com)
-* [StyleCI](https://styleci.io/)
\ No newline at end of file
+* [StyleCI](https://styleci.io/)
+* [pragmarx/google2fa](https://github.com/antonioribeiro/google2fa)
+* [Bacon/BaconQrCode](https://github.com/Bacon/BaconQrCode)
\ No newline at end of file
<span class="text-neg">@icon('cancel')</span>
@endif
{{ trans_choice('settings.users_mfa_x_methods', $mfaMethods->count()) }}
- {{ $mfaMethods->count() }} {{ $mfaMethods->count() === 1 ? 'method' : 'methods' }} configured
</div>
<div class="text-m-right">
@if($user->id === user()->id)