Fixed duplicate oauth fetch along with DRY improvement #1858

Fixes the duplicate Oauth issue.
What's this magic number 10 about?