Refactoring auth payload to take a callback