oauth methods refactoring