Save device correctly when pairing with OTP

This commit is contained in:
Yukino Song
2024-08-28 04:26:59 +08:00
parent f999f3364b
commit 184f5d8af0

View File

@@ -622,6 +622,8 @@ namespace nvhttp {
auto hash = util::hex(crypto::hash(one_time_pin + ptr->second.async_insert_pin.salt + otp_passphrase), true);
if (hash.to_string_view() == it->second) {
ptr->second.async_insert_pin.response = std::move(response);
fg.disable();
pin(one_time_pin, deviceName);
one_time_pin.clear();
otp_passphrase.clear();