Commit 74652f5d authored by Randall Leeds's avatar Randall Leeds

Don't block API requests on the auth dialog

The auth dialog waits for the background authentication check to fail,
but it shouldn't replace that promise with its own. It is perfectly
fine for the application to proceed while the user is entering
credentials.

In particular, this makes sure that a search without any authorization
can be performed even when the firstrun flag causes the login dialog
to show.
parent b96f8364
......@@ -113,7 +113,6 @@ function forgetAuthentication($q, flash, session) {
function requestAuthentication($injector, $q, $rootScope) {
return authPromise.catch(function () {
var deferred = $q.defer();
authPromise = deferred.promise;
$rootScope.$on('auth', function(event, err, data) {
if (err) {
......@@ -125,7 +124,7 @@ function requestAuthentication($injector, $q, $rootScope) {
}
});
return authPromise;
return deferred.promise;
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment