diff --git a/src/URI/Otpauth.php b/src/URI/Otpauth.php index 9633434..9e7f139 100644 --- a/src/URI/Otpauth.php +++ b/src/URI/Otpauth.php @@ -14,7 +14,9 @@ class Otpauth public readonly int $digits, public readonly int $period, ) - {} + { + $this->secret = \rtrim($secret, "="); + } public static function fromString(string $uri): self { diff --git a/src/Workflow/UserManagement.php b/src/Workflow/UserManagement.php index 838bd52..939178c 100644 --- a/src/Workflow/UserManagement.php +++ b/src/Workflow/UserManagement.php @@ -38,17 +38,17 @@ class UserManagement implements WorkflowInterface $html = "
"; $provisioningUri = (new Otpauth( - "taatp", $this->db->userString($this->userIndex), + "taatp", $this->hash->keygen(), - "SHA1", + $this->hash->hashType(), 30, 6 ))->emitStr();