OAuth small refactoring