Oauth channels simplified

Add tests for completeOAuthFlow and completeOAuthFlowWithError.