work around double login issue by generating keypair on each launch
Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -277,6 +277,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 276 unmodified lines | |||
| 277 | 277 | ||
| 278 | connect(&accountManager, &AccountManager::authRequired, Menu::getInstance(), &Menu::loginForCurrentDomain); | 278 | connect(&accountManager, &AccountManager::authRequired, Menu::getInstance(), &Menu::loginForCurrentDomain); |
| 279 | connect(&accountManager, &AccountManager::usernameChanged, this, &Application::updateWindowTitle); | 279 | connect(&accountManager, &AccountManager::usernameChanged, this, &Application::updateWindowTitle); |
| 280 | |||
| 281 | // once we have a profile in account manager make sure we generate a new keypair | ||
| 282 | connect(&accountManager, &AccountManager::profileChanged, &accountManager, &AccountManager::generateNewKeypair); | ||
| 280 | 283 | ||
| 281 | // set the account manager's root URL and trigger a login request if we don't have the access token | 284 | // set the account manager's root URL and trigger a login request if we don't have the access token |
| 282 | accountManager.setAuthURL(DEFAULT_NODE_AUTH_URL); | 285 | accountManager.setAuthURL(DEFAULT_NODE_AUTH_URL); |