| 725 | * a logout on one instance would leave the token valid on every other. |
| 726 | */ |
| 727 | const checkCacheProviderInProd = (env: Env): string[] => { |
| 728 | if (env.NODE_ENV !== "production" || !env.CACHE_ENABLED) { |
| 729 | return []; |
| 730 | } |
| 731 | |
| 732 | return env.CACHE_PROVIDER === "valkey" |
| 733 | ? [] |
| 734 | : [ |
| 735 | "CACHE_PROVIDER must be valkey in production when CACHE_ENABLED=true so JWT revocation state survives restarts and is shared across replicas", |
| 736 | ]; |
| 737 | }; |
| 738 | |
| 739 | const checkValkeyPassword = (env: Env): string[] => { |
| 740 | if (env.NODE_ENV !== "production" || env.VALKEY_PASSWORD !== "") { |