chore: code cleanup
This commit is contained in:
1 parent
1a3640b15c
commit
5a01054b0e
65 files changed
+1046
-795
No files matched your search
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Controller\Security;
|
||||
|
||||
use App\Security\OAuth2\EpClient;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
|
||||
final class LoginController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly EpClient $client)
|
||||
{
|
||||
}
|
||||
|
||||
#[Route('/login', name: 'app_login', methods: ['GET'])]
|
||||
public function index(): Response
|
||||
{
|
||||
if ($this->getUser()) {
|
||||
return $this->redirectToRoute('app_dashboard');
|
||||
}
|
||||
|
||||
return $this->render('security/login.html.twig', [
|
||||
'oauth2_configured' => $this->client->isConfigured(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user