Update OAuth.php

Conditional to check port existence