diff --git a/interface/src/ui/DialogsManager.cpp b/interface/src/ui/DialogsManager.cpp index 272c495789..848663967f 100644 --- a/interface/src/ui/DialogsManager.cpp +++ b/interface/src/ui/DialogsManager.cpp @@ -117,8 +117,6 @@ void DialogsManager::toggleLoginDialog() { void DialogsManager::showLoginDialog() { - qDebug() << "#######: showLoginDialog()"; - // ####### TODO: May be called from script via DialogsManagerScriptingInterface. Need to handle the case that it's already // displayed and may be the domain login version. @@ -132,9 +130,6 @@ void DialogsManager::hideLoginDialog() { void DialogsManager::showDomainLoginDialog() { - - qDebug() << "#######: showDomainLoginDialog()"; - _isDomainLogin = true; LoginDialog::showWithSelection(); } diff --git a/interface/src/ui/LoginDialog.cpp b/interface/src/ui/LoginDialog.cpp index f185b0ab2b..94800529b9 100644 --- a/interface/src/ui/LoginDialog.cpp +++ b/interface/src/ui/LoginDialog.cpp @@ -133,14 +133,12 @@ void LoginDialog::dismissLoginDialog() { } void LoginDialog::login(const QString& username, const QString& password) const { - qDebug() << "Attempting to login " << username; + qDebug() << "Attempting to login" << username; DependencyManager::get()->requestAccessToken(username, password); } void LoginDialog::loginDomain(const QString& username, const QString& password, const QString& domainAuthProvider) const { - qDebug() << "####### LoginDialog::loginDomain()"; - - qDebug() << "Attempting to login " << username << "into a domain through" << domainAuthProvider; + qDebug() << "Attempting to login" << username << "into a domain through" << domainAuthProvider; // ####### TODO // DependencyManager::get()->requestAccessToken(username, password, domainAuthProvider); diff --git a/libraries/networking/src/DomainAccountManager.cpp b/libraries/networking/src/DomainAccountManager.cpp index 0d7f38d3f6..d1da09817c 100644 --- a/libraries/networking/src/DomainAccountManager.cpp +++ b/libraries/networking/src/DomainAccountManager.cpp @@ -11,6 +11,8 @@ #include "DomainAccountManager.h" +#include + DomainAccountManager::DomainAccountManager() { @@ -28,7 +30,9 @@ bool DomainAccountManager::checkAndSignalForAccessToken() { if (!hasToken) { // Emit a signal so somebody can call back to us and request an access token given a user name and password. - emit authRequired(); + + // Dialog can be hidden immediately after showing if we've just teleported to the domain, unless the signal is delayed. + QTimer::singleShot(500, this, [this] { emit this->authRequired(); }); } return hasToken;