raise if missing env

This commit is contained in:
CJ_Clippy 2025-01-16 12:50:18 -08:00
parent 1753b6a455
commit 43ebe15745
2 changed files with 5 additions and 3 deletions

View File

@ -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
#

View File

@ -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")