diff --git a/.env b/.env index c1ef931..9897b70 100644 --- a/.env +++ b/.env @@ -69,6 +69,7 @@ OAUTH_PRIVATE_KEY=%kernel.project_dir%/config/jwt/private.pem OAUTH_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem OAUTH_PASSPHRASE=df7ec1f514c44825926e3dabaf34e3f5 OAUTH_ENCRYPTION_KEY=325b6ce98c009bb83e885657ec08d142 +OAUTH_ACCESS_TOKEN_TTL=PT1H ###< league/oauth2-server-bundle ### ###> knpuniversity/oauth2-client-bundle ### diff --git a/config/packages/league_oauth2_server.yaml b/config/packages/league_oauth2_server.yaml index cfdec5f..fbc177c 100644 --- a/config/packages/league_oauth2_server.yaml +++ b/config/packages/league_oauth2_server.yaml @@ -2,6 +2,7 @@ league_oauth2_server: client: classname: App\Entity\OAuth2Client authorization_server: + access_token_ttl: '%env(OAUTH_ACCESS_TOKEN_TTL)%' private_key: '%env(resolve:OAUTH_PRIVATE_KEY)%' private_key_passphrase: '%env(resolve:OAUTH_PASSPHRASE)%' encryption_key: '%env(resolve:OAUTH_ENCRYPTION_KEY)%' diff --git a/config/services.yaml b/config/services.yaml index fbe65ed..bacb5c7 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -4,6 +4,12 @@ # Put parameters here that don't need to change on each machine where the app is deployed # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration parameters: + env(OAUTH_ACCESS_TOKEN_TTL): PT1H + +when@prod: + parameters: + router.request_context.scheme: 'https' + asset.request_context.secure: true services: # default configuration for services in *this* file diff --git a/templates/security/login.html.twig b/templates/security/login.html.twig index d3d49cd..79dabc0 100644 --- a/templates/security/login.html.twig +++ b/templates/security/login.html.twig @@ -47,7 +47,7 @@
  • - {{ + {{