Pass the request into the onAuth function