From 5615813e728b54cec0a3e6c117003b5c138a1703 Mon Sep 17 00:00:00 2001 From: sterni Date: Thu, 27 Feb 2025 15:41:40 +0100 Subject: [PATCH] fix(web/panettone): initialise *oauth2-redirect-uri* at runtime Optimisations seem to cause *oauth2-redirect-uri* to be baked in if we try to check the environment in DEFVAR. Change-Id: Id53b880061239141936298f673ff8e745442af94 Reviewed-on: https://cl.tvl.fyi/c/depot/+/13186 Reviewed-by: tazjin Autosubmit: sterni Tested-by: BuildkiteCI --- web/panettone/src/authentication.lisp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/panettone/src/authentication.lisp b/web/panettone/src/authentication.lisp index 496a0e0bd..58deef196 100644 --- a/web/panettone/src/authentication.lisp +++ b/web/panettone/src/authentication.lisp @@ -37,10 +37,7 @@ the user, however email addresses are temporarily not available." (defvar *oauth2-token-endpoint* nil) (defvar *oauth2-client-id* nil) (defvar *oauth2-client-secret* nil) - -(defvar *oauth2-redirect-uri* - (or (uiop:getenv "OAUTH2_REDIRECT_URI") - "https://b.tvl.fyi/auth")) +(defvar *oauth2-redirect-uri* nil) (comment (setq *oauth2-redirect-uri* "http://localhost:6161/auth") @@ -64,6 +61,10 @@ the user, however email addresses are temporarily not available." (uiop:getenv "OAUTH2_CLIENT_ID") "panettone")) + (setq *oauth2-redirect-uri* + (or (uiop:getenv "OAUTH2_REDIRECT_URI") + "https://b.tvl.fyi/auth")) + (setq *oauth2-client-secret* (or *oauth2-client-secret* (uiop:getenv "OAUTH2_CLIENT_SECRET")