Closed phnx47 closed 9 years ago
Thanks for the pull request!
I understand the desire to have async functionality, but I'm not sure about the user experience with this. If you have a request that takes 1s to complete, the page will flash to the blocked page for 1s before being redirected back. This can be tested by adding a timeout in the getRole
function in the example app like this:
auth.getRole = function(){
var deferred = $q.defer();
$timeout(function(){
deferred.resolve(self.role);
}, 1000);
return deferred.promise;
};
My feeling is that this temporary flash is unacceptable for something used for security purposes. What do you think?
1000ms is not acceptable. I have the answer 10-30ms with network delays. The data is taken from cookie.
I create async version. Because, I need get user role from backend, and first page is down.