fix: allow unsecure authentication cookies in dev

This commit is contained in:
Vincent
2024-08-19 13:41:02 +02:00
parent c504902724
commit 102a0ba997
2 changed files with 4 additions and 1 deletions

View File

@@ -32,6 +32,8 @@ services:
- '../src/DependencyInjection/' - '../src/DependencyInjection/'
- '../src/Entity/' - '../src/Entity/'
- '../src/Kernel.php' - '../src/Kernel.php'
bind:
$appEnv: '%kernel.environment%'
# add more service definitions when explicit configuration is needed # add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones # please note that last definitions always *replace* previous ones

View File

@@ -21,6 +21,7 @@ class JWTAuthenticator implements AuthenticationSuccessHandlerInterface
public function __construct( public function __construct(
protected JWTTokenManagerInterface $jwtManager, protected JWTTokenManagerInterface $jwtManager,
protected EventDispatcherInterface $dispatcher, protected EventDispatcherInterface $dispatcher,
private string $appEnv,
) { ) {
} }
@@ -46,7 +47,7 @@ class JWTAuthenticator implements AuthenticationSuccessHandlerInterface
time() + 604800, // expiration time() + 604800, // expiration
'/', '/',
null, null,
true, 'prod' === $this->appEnv,
true, true,
false, false,
'strict' 'strict'