refactor oauth operations into separate class