mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-20 11:47:53 +02:00
Fix #103 - Remove replicated service's name in account's name during G-Auth import
This commit is contained in:
parent
6107e687f9
commit
8e397fb5ca
@ -86,8 +86,8 @@ class TwoFAccountService
|
||||
|
||||
try {
|
||||
$parameters['otp_type'] = GAuthValueMapping::OTP_TYPE[OtpType::name($otp_parameters->getType())];
|
||||
$parameters['account'] = $otp_parameters->getName();
|
||||
$parameters['service'] = $otp_parameters->getIssuer();
|
||||
$parameters['account'] = str_replace($parameters['service'].':', '', $otp_parameters->getName());
|
||||
$parameters['secret'] = Base32::encodeUpper($otp_parameters->getSecret());
|
||||
$parameters['algorithm'] = GAuthValueMapping::ALGORITHM[Algorithm::name($otp_parameters->getAlgorithm())];
|
||||
$parameters['digits'] = GAuthValueMapping::DIGIT_COUNT[DigitCount::name($otp_parameters->getDigits())];
|
||||
|
Loading…
x
Reference in New Issue
Block a user