Refactored oauth configuration