Updated qr code generation code
This commit is contained in:
2 files changed
+12
-3
No files matched your search
@@ -30,6 +30,11 @@ Install files and programs
|
||||
./install_binaries.sh
|
||||
```
|
||||
|
||||
When updating the application, copy the updated `composer.json` to `/var/www/mail/` and refresh the installed dependencies and autoloader:
|
||||
```
|
||||
cd /var/www/mail && composer install --no-dev --no-interaction
|
||||
```
|
||||
|
||||
Copy (and modify according to your needs) the site files in `etc` to `/etc` after installation has finished. Then restart some services:
|
||||
```
|
||||
systemctl daemon-reload && systemctl restart tor@default.service
|
||||
|
||||
+7
-3
@@ -184,9 +184,13 @@ function get_totp_provisioning_uri( string $account, string $secret ): string
|
||||
|
||||
function get_totp_qr_data_uri( string $totp_uri ): string
|
||||
{
|
||||
$qrCode = \Endroid\QrCode\QrCode::create( $totp_uri )
|
||||
->setSize( 220 )
|
||||
->setMargin( 8 );
|
||||
$qrCode = new \Endroid\QrCode\QrCode(
|
||||
$totp_uri,
|
||||
new \Endroid\QrCode\Encoding\Encoding( 'UTF-8' ),
|
||||
\Endroid\QrCode\ErrorCorrectionLevel::Low,
|
||||
220,
|
||||
8
|
||||
);
|
||||
return ( new \Endroid\QrCode\Writer\PngWriter() )->write( $qrCode )->getDataUri();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user