trying to call scope.onauth