Refactor code according to GateIn API update (adding portal.getOAuthProvider)