/** * @throws Exception */ public function init() { if (!class_exists($this->serviceClass)) { throw new Exception(Yii::t('SyncSocial', 'Authclient Extension not support "{serviceName}" service', ['{serviceName}' => $this->serviceClass])); } if (empty($this->returnUrl)) { $this->returnUrl = $this->connectUrl; } $this->service = new $this->serviceClass($this->serviceSettings); $this->service->setReturnUrl($this->returnUrl); }