Exemple #1
0
 public function signInOauth2(RegistrationRequest $registrationRequest)
 {
     if (!$this->accountService->hasAccountWithEmail($registrationRequest->getEmail())) {
         $this->accountService->createOAuth2Account($registrationRequest);
     }
     $oauth2Account = $this->accountService->findOAuthAccount($registrationRequest->getProvider(), $registrationRequest->getProviderAccountId());
     return $this->auth($oauth2Account->getAccount());
 }