src/Action/User/Login/Google/AuthAction.php line 12

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Action\User\Login\Google;
  4. use App\Service\Google\AuthService;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\HttpFoundation\RedirectResponse;
  7. use Symfony\Component\HttpFoundation\Response;
  8. class AuthAction extends AbstractController
  9. {
  10.     public function __invoke(AuthService $authService): Response
  11.     {
  12.         $authUrl $authService->createUrl();
  13.         return new RedirectResponse((string) $authUrl);
  14.     }
  15. }