mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-05 16:50:12 +00:00
Added attribution for new libs added
- Also hard-set TOTP algorithm with comment from testing others.
This commit is contained in:
parent
f1f59cf086
commit
622ea03c65
3 changed files with 8 additions and 2 deletions
|
@ -9,6 +9,7 @@ use BaconQrCode\Renderer\RendererStyle\Fill;
|
||||||
use BaconQrCode\Renderer\RendererStyle\RendererStyle;
|
use BaconQrCode\Renderer\RendererStyle\RendererStyle;
|
||||||
use BaconQrCode\Writer;
|
use BaconQrCode\Writer;
|
||||||
use PragmaRX\Google2FA\Google2FA;
|
use PragmaRX\Google2FA\Google2FA;
|
||||||
|
use PragmaRX\Google2FA\Support\Constants;
|
||||||
|
|
||||||
class TotpService
|
class TotpService
|
||||||
{
|
{
|
||||||
|
@ -17,6 +18,10 @@ class TotpService
|
||||||
public function __construct(Google2FA $google2fa)
|
public function __construct(Google2FA $google2fa)
|
||||||
{
|
{
|
||||||
$this->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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -189,4 +189,6 @@ These are the great open-source projects used to help build BookStack:
|
||||||
* [OneLogin's SAML PHP Toolkit](https://github.com/onelogin/php-saml)
|
* [OneLogin's SAML PHP Toolkit](https://github.com/onelogin/php-saml)
|
||||||
* [League/CommonMark](https://commonmark.thephpleague.com/)
|
* [League/CommonMark](https://commonmark.thephpleague.com/)
|
||||||
* [League/Flysystem](https://flysystem.thephpleague.com)
|
* [League/Flysystem](https://flysystem.thephpleague.com)
|
||||||
* [StyleCI](https://styleci.io/)
|
* [StyleCI](https://styleci.io/)
|
||||||
|
* [pragmarx/google2fa](https://github.com/antonioribeiro/google2fa)
|
||||||
|
* [Bacon/BaconQrCode](https://github.com/Bacon/BaconQrCode)
|
|
@ -74,7 +74,6 @@
|
||||||
<span class="text-neg">@icon('cancel')</span>
|
<span class="text-neg">@icon('cancel')</span>
|
||||||
@endif
|
@endif
|
||||||
{{ trans_choice('settings.users_mfa_x_methods', $mfaMethods->count()) }}
|
{{ trans_choice('settings.users_mfa_x_methods', $mfaMethods->count()) }}
|
||||||
{{ $mfaMethods->count() }} {{ $mfaMethods->count() === 1 ? 'method' : 'methods' }} configured
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-m-right">
|
<div class="text-m-right">
|
||||||
@if($user->id === user()->id)
|
@if($user->id === user()->id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue