change waiting in getOAuth method to use iterative way instead of recurs...

...ive to avoid stackoverflow