Ejemplo n.º 1
0
 /**
  * Redirect to Authentication URL.
  *
  * @param int $state;
  *
  * @return \Illuminate\Http\Response;
  */
 public function authenticate(int $state)
 {
     parent::authenticate($state);
     $redirUrl = \URL::route('package.Userdesk.submission.authenticate', ['website' => 'twitter', 'state' => $state]);
     $tw = $this->provider($redirUrl);
     $reqToken = $tw->requestRequestToken();
     $url = $tw->getAuthorizationUri(['oauth_token' => $reqToken->getRequestToken()]);
     return redirect((string) $url);
 }
Ejemplo n.º 2
0
 /**
  * Redirect to Authentication URL.
  *
  * @param int $state;
  *
  * @return \Illuminate\Http\Response;;
  */
 public function authenticate(int $state)
 {
     parent::authenticate($state);
     $redirUrl = route('package.Userdesk.submission.authenticate', ['website' => 'facebook']);
     $fb = $this->provider($redirUrl);
     $url = $fb->getAuthorizationUri(['state' => $state]);
     return redirect((string) $url);
 }
Ejemplo n.º 3
0
 /**
  * Redirect to Authentication URL.
  *
  * @param int $state;
  *
  * @return \Illuminate\Http\Response;;
  */
 public function authenticate(int $state)
 {
     parent::authenticate($state);
     $redirUrl = route('package.Userdesk.submission.authenticate', ['website' => 'youtube']);
     $googleService = $this->provider($redirUrl);
     $googleService->setAccessType('offline');
     $url = $googleService->getAuthorizationUri(['state' => $state]);
     return redirect((string) $url);
 }