19 lines
608 B
PHP
19 lines
608 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Controller;
|
|
|
|
use KnpU\OAuth2ClientBundle\Client\ClientRegistry;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
use Symfony\Component\Routing\Attribute\Route;
|
|
|
|
class AuthenticationController extends AbstractController
|
|
{
|
|
#[Route(path: '/auth/callback', name: 'auth_callback', methods: Request::METHOD_GET)]
|
|
public function __invoke(ClientRegistry $clientRegistry): Response
|
|
{
|
|
$clientRegistry->getClient('auth')->fetchUser();
|
|
}
|
|
} |