From 8435819ba319ea8f677dfe85f0ac639e29ffad1e Mon Sep 17 00:00:00 2001 From: Ben Rosser Date: Mon, 28 Dec 2015 17:18:45 -0500 Subject: [PATCH] First attempt local auth, then try external provider --- src/core/coreauthhandler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/coreauthhandler.cpp b/src/core/coreauthhandler.cpp index 47c57965..a4c06f33 100644 --- a/src/core/coreauthhandler.cpp +++ b/src/core/coreauthhandler.cpp @@ -218,12 +218,12 @@ void CoreAuthHandler::handle(const Login &msg) if (!checkClientRegistered()) return; - //UserId uid = Core::validateUser(msg.user, msg.password); - UserId uid = Core::authenticateUser(msg.user, msg.password); - - // Try doing direct database auth if the provider failed, first. - if (uid == 0) { - uid = Core::validateUser(msg.user, msg.password); + // First attempt local auth using the real username and password. + // If that fails, move onto the auth provider. + UserId uid = Core::validateUser(msg.user, msg.password); + if (uid == 0) + { + uid = Core::authenticateUser(msg.user, msg.password); } if (uid == 0) { -- 2.20.1