mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-23 13:31:27 +02:00
Fix empty secret after running fillWithOtpParameters()
This commit is contained in:
parent
a47975c46e
commit
7c924126a3
@ -374,6 +374,10 @@ class TwoFAccount extends Model implements Sortable
|
||||
|
||||
$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…
x
Reference in New Issue
Block a user