mirror of
https://github.com/RobThree/TwoFactorAuth.git
synced 2026-08-25 11:56:34 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ecee1426cf | |||
| 515f3a9bb8 | |||
| 83918a7658 | |||
| 9b2d795acc | |||
| 24f6d2fd10 | |||
| 6d70f9ca8e |
@@ -10,11 +10,16 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php-version: ['8.2', '8.3']
|
php-version: [8.2, 8.3, 8.4, 8.5]
|
||||||
bacon-version: ['^2', '^3']
|
bacon-version: ["^2", "^3"]
|
||||||
|
exclude:
|
||||||
|
- php-version: 8.4
|
||||||
|
bacon-version: "^2"
|
||||||
|
- php-version: 8.5
|
||||||
|
bacon-version: "^2"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- uses: shivammathur/setup-php@v2
|
- uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -10,11 +10,24 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php-version: ['8.2', '8.3']
|
php-version: [8.2, 8.3, 8.4, 8.5]
|
||||||
endroid-version: ["^3","^4","^5","^6"]
|
endroid-version: ["^3", "^4", "^5", "^6"]
|
||||||
|
exclude:
|
||||||
|
- php-version: 8.4
|
||||||
|
endroid-version: "^3"
|
||||||
|
- php-version: 8.4
|
||||||
|
endroid-version: "^4"
|
||||||
|
- php-version: 8.4
|
||||||
|
endroid-version: "^5"
|
||||||
|
- php-version: 8.5
|
||||||
|
endroid-version: "^3"
|
||||||
|
- php-version: 8.5
|
||||||
|
endroid-version: "^4"
|
||||||
|
- php-version: 8.5
|
||||||
|
endroid-version: "^5"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- uses: shivammathur/setup-php@v2
|
- uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php-version: ['8.2', '8.3']
|
php-version: [8.2, 8.3, 8.4, 8.5]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- uses: shivammathur/setup-php@v2
|
- uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ If you need more in-depth information about the configuration available then you
|
|||||||
|
|
||||||
## Integrations
|
## Integrations
|
||||||
|
|
||||||
- [CakePHP 3](https://github.com/andrej-griniuk/cakephp-two-factor-auth)
|
- [CakePHP plugin](https://github.com/andrej-griniuk/cakephp-two-factor-auth)
|
||||||
- [CI4-Auth: a user, group, role and permission management library for Codeigniter 4](https://github.com/glewe/ci4-auth)
|
- [CI4-Auth: a user, group, role and permission management library for Codeigniter 4](https://github.com/glewe/ci4-auth)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
+4
-2
@@ -11,8 +11,10 @@
|
|||||||
include_once str_replace(array('RobThree\\Auth', '\\'), array(__DIR__.'/../lib', '/'), $className) . '.php';
|
include_once str_replace(array('RobThree\\Auth', '\\'), array(__DIR__.'/../lib', '/'), $className) . '.php';
|
||||||
});
|
});
|
||||||
|
|
||||||
// substitute your company or app name here
|
$tfa = new RobThree\Auth\TwoFactorAuth(
|
||||||
$tfa = new RobThree\Auth\TwoFactorAuth(new RobThree\Auth\Providers\Qr\QRServerProvider());
|
new RobThree\Auth\Providers\Qr\QRServerProvider(),
|
||||||
|
"Acme Corp" // substitute your company or app name here
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
<li>First create a secret and associate it with a user</li>
|
<li>First create a secret and associate it with a user</li>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -33,11 +33,15 @@ class EndroidQrCodeWithLogoProvider extends EndroidQrCodeProvider
|
|||||||
|
|
||||||
$logo = null;
|
$logo = null;
|
||||||
if ($this->logoPath) {
|
if ($this->logoPath) {
|
||||||
$logo = Logo::create($this->logoPath);
|
if ($this->endroid6) {
|
||||||
if ($this->logoSize) {
|
$logo = new Logo($this->logoPath, ...$this->logoSize);
|
||||||
$logo->setResizeToWidth($this->logoSize[0]);
|
} else {
|
||||||
if (isset($this->logoSize[1])) {
|
$logo = Logo::create($this->logoPath);
|
||||||
$logo->setResizeToHeight($this->logoSize[1]);
|
if ($this->logoSize) {
|
||||||
|
$logo->setResizeToWidth($this->logoSize[0]);
|
||||||
|
if (isset($this->logoSize[1])) {
|
||||||
|
$logo->setResizeToHeight($this->logoSize[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user