JWTRefreshTokenBundle icon indicating copy to clipboard operation
JWTRefreshTokenBundle copied to clipboard

Setting cookie same_site with env variable not possible

Open Retch opened this issue 1 year ago • 3 comments

I can't set the same_site via environment variable, but the other settings are working. gesdinet_jwt_refresh_token.yaml image .env image php bin/console debug:container --env-vars image This is working ⬆️

But when i use a var for same site ⬇️ image image image How is it possible to accomplish this?

Retch avatar Sep 07 '23 12:09 Retch

TBH, I don't know if Symfony itself supports env vars in config nodes that are defined as an enum (fixed list, not the PHP core enum), that error's coming from the config component's validation step. That said, even if it's accepting env vars for other values in the cookie config, since that config's not being post-processed in any way, I'm not so sure it's actually pushing resolved values through to the services (you might need to dump the gesdinet_jwt_refresh_token.cookie container parameter or check into what values are actually being pushed into the gesdinet.jwtrefreshtoken.send_token service to make sure it's actually getting the right info).

mbabker avatar Sep 11 '23 14:09 mbabker

@Retch did you resolve this issue somehow?

Symfony fixed ENV in enum config nodes long ago for this exact same usecase https://github.com/symfony/symfony/pull/45624 but not sure if it even works for their config.

Trying to debug it, looks like placeholders are not resolved in EnumNode - self::$placeholders contains only empty strings for all ENV variables.

Payn avatar May 28 '24 16:05 Payn

@Payn i don't really know anymore. Maybe i should have a look in the project again and tell you.

Retch avatar May 31 '24 06:05 Retch