Skip to content

Commit 9d785b4

Browse files
authored
Update main.cpp
1 parent dc28bfb commit 9d785b4

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

x64/main.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ using namespace KeyAuth;
1616

1717
// copy and paste from https://keyauth.cc/app/ and replace these string variables
1818
// Please watch tutorial HERE https://www.youtube.com/watch?v=5x4YkTmFH-U
19-
std::string name = skCrypt("name").decrypt(); // App name
20-
std::string ownerid = skCrypt("ownerid").decrypt(); // Account ID
19+
std::string name = skCrypt("").decrypt(); // App name
20+
std::string ownerid = skCrypt("").decrypt(); // Account ID
2121
std::string version = skCrypt("1.0").decrypt(); // Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs
2222
std::string url = skCrypt("https://keyauth.win/api/1.3/").decrypt(); // change if using KeyAuth custom domains feature
2323
std::string path = skCrypt("").decrypt(); // (OPTIONAL) see tutorial here https://www.youtube.com/watch?v=I9rxt821gMk&t=1s
2424

25-
2625
api KeyAuthApp(name, ownerid, version, url, path);
2726

2827
int main()
@@ -85,11 +84,8 @@ int main()
8584
std::cout << skCrypt("\n Enter password: ");
8685
std::cin >> password;
8786
std::cout << skCrypt("\n Enter 2fa code if applicable: ");
88-
std::cin.ignore(); // Ignore the newline character left by the previous input
89-
std::getline(std::cin, TfaCode); // Allow empty input for 2FA code
90-
if (TfaCode.empty()) {
91-
std::cout << skCrypt("\n No 2fa code entered, continuing without it\n");
92-
}
87+
std::cin.ignore();
88+
std::getline(std::cin, TfaCode);
9389
KeyAuthApp.login(username, password, TfaCode);
9490
break;
9591
case 2:
@@ -112,7 +108,8 @@ int main()
112108
std::cout << skCrypt("\n Enter license: ");
113109
std::cin >> key;
114110
std::cout << skCrypt("\n Enter 2fa code if applicable: ");
115-
std::cin >> TfaCode;
111+
std::cin.ignore();
112+
std::getline(std::cin, TfaCode);
116113
KeyAuthApp.license(key, TfaCode);
117114
break;
118115
default:

0 commit comments

Comments
 (0)