We need to keep the above logic as your logic would always return true.
The tests were performed earlier when we incorporated this logic of introducing various ways, a user can configure autoAuthenticate.