fix: HTTP (!s) scheme in callback for OAuth2 providers (#254)
* fix: bad path to oauth2 provider logo * feat: set https scheme on router on prod context * feat: configure oauth2 jwts ttl via env var * fix: bad nesting of access_token_ttl yaml option
This commit is contained in:
@@ -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 ###
|
||||
|
||||
@@ -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)%'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<li>
|
||||
<div class="bg-white border border-grey rounded-2xl p-4 shadow-sm">
|
||||
<a href="{{ path('oauth_providers_start', { provider: provider }) }}">
|
||||
<img class="max-h-12 h-full" src="/oauth/providers/{{ provider }}.png" alt={{ provider }}>
|
||||
<img class="max-h-12 h-full" src="/oauth2/providers/{{ provider }}.png" alt={{ provider }}>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user