diff --git a/launcher/include/account.h b/launcher/include/account.h index 20e4b0a..4634906 100644 --- a/launcher/include/account.h +++ b/launcher/include/account.h @@ -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; diff --git a/launcher/src/account.cpp b/launcher/src/account.cpp index 1802a75..bc0cf58 100644 --- a/launcher/src/account.cpp +++ b/launcher/src/account.cpp @@ -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);