1
Fork 0
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:
Joshua Goins 2023-09-20 15:33:26 -04:00
parent 23db248d82
commit 7db9cdeb42
2 changed files with 6 additions and 0 deletions

View file

@ -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;

View file

@ -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);