mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-23 00:33:18 +01:00
Fix empty secret after running fillWithOtpParameters()
This commit is contained in:
parent
a47975c46e
commit
7c924126a3
@ -373,6 +373,10 @@ public function fillWithOtpParameters(array $parameters, bool $skipIconFetching
|
||||
$this->counter = Arr::get($parameters, 'counter', $this->otp_type == self::HOTP ? self::DEFAULT_COUNTER : null);
|
||||
|
||||
$this->initGenerator();
|
||||
|
||||
// The generator could have been initialized without a secret, in that case it generates one on the fly.
|
||||
// The secret attribute has thus to be updated
|
||||
$this->secret = $this->secret ?: $this->generator->getSecret();
|
||||
|
||||
if ($this->otp_type === self::STEAM_TOTP || strtolower($this->service) === 'steam') {
|
||||
$this->enforceAsSteam();
|
||||
|
Loading…
Reference in New Issue
Block a user