move oauth usage to service