mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 12:47:44 +00:00
Add back ability to set OTP secret through account settings
This commit is contained in:
parent
23db248d82
commit
7db9cdeb42
2 changed files with 6 additions and 0 deletions
|
@ -73,6 +73,7 @@ public:
|
|||
void setPassword(const QString &password);
|
||||
|
||||
Q_INVOKABLE QString getOTP();
|
||||
Q_INVOKABLE void setOTPSecret(const QString &secret);
|
||||
|
||||
[[nodiscard]] QDir getConfigDir() const;
|
||||
|
||||
|
|
|
@ -192,6 +192,11 @@ QString Account::getOTP()
|
|||
return totpStr;
|
||||
}
|
||||
|
||||
void Account::setOTPSecret(const QString &secret)
|
||||
{
|
||||
setKeychainValue(QStringLiteral("otp-secret"), secret);
|
||||
}
|
||||
|
||||
QDir Account::getConfigDir() const
|
||||
{
|
||||
const QDir dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
|
||||
|
|
Loading…
Add table
Reference in a new issue