From 43ebe15745d37b05a658da6f67cbfd9083c1b083 Mon Sep 17 00:00:00 2001 From: CJ_Clippy Date: Thu, 16 Jan 2025 12:50:18 -0800 Subject: [PATCH] raise if missing env --- services/bright/config/config.exs | 3 --- services/bright/config/runtime.exs | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/services/bright/config/config.exs b/services/bright/config/config.exs index 380ab36..00101b4 100644 --- a/services/bright/config/config.exs +++ b/services/bright/config/config.exs @@ -39,9 +39,6 @@ config :ueberauth, Ueberauth, patreon: {Ueberauth.Strategy.Patreon, []} ] -config :ueberauth, Ueberauth.Strategy.Github.OAuth, - client_id: System.get_env("GITHUB_CLIENT_ID") || raise("environment variable GITHUB_CLIENT_ID is missing."), - client_secret: System.get_env("GITHUB_CLIENT_SECRET") || raise("environment variable GITHUB_CLIENT_SECRET is missing.") # Configures the mailer # diff --git a/services/bright/config/runtime.exs b/services/bright/config/runtime.exs index cfaeab1..b75a279 100644 --- a/services/bright/config/runtime.exs +++ b/services/bright/config/runtime.exs @@ -65,6 +65,11 @@ if config_env() == :prod do ], secret_key_base: secret_key_base + config :ueberauth, Ueberauth.Strategy.Github.OAuth, + client_id: System.get_env("GITHUB_CLIENT_ID") || raise("environment variable GITHUB_CLIENT_ID is missing."), + client_secret: System.get_env("GITHUB_CLIENT_SECRET") || raise("environment variable GITHUB_CLIENT_SECRET is missing.") + + # config :ueberauth, Ueberauth.Strategy.Patreon.OAuth, # client_id: System.get_env("PATREON_CLIENT_ID"), # client_secret: System.get_env("PATREON_CLIENT_SECRET")