Moved ueberauth configuration to runtime

account
Alexey Patrikeev 2 years ago committed by Viktor Baranov
parent 58358e2cc9
commit b292cc1f07
  1. 14
      apps/block_scout_web/config/config.exs
  2. 11
      apps/block_scout_web/config/runtime/test.exs
  3. 13
      apps/block_scout_web/config/test.exs
  4. 13
      config/runtime.exs

@ -78,12 +78,6 @@ config :block_scout_web, BlockScoutWeb.ApiRouter,
config :block_scout_web, BlockScoutWeb.WebRouter, enabled: System.get_env("DISABLE_WEBAPP") != "true"
# Configures Ueberauth's Auth0 auth provider
config :ueberauth, Ueberauth.Strategy.Auth0.OAuth,
domain: System.get_env("AUTH0_DOMAIN"),
client_id: System.get_env("AUTH0_CLIENT_ID"),
client_secret: System.get_env("AUTH0_CLIENT_SECRET")
# Configures Ueberauth local settings
config :ueberauth, Ueberauth,
providers: [
@ -95,16 +89,12 @@ config :ueberauth, Ueberauth,
Ueberauth.Strategy.Auth0,
[callback_path: "/auth/auth0/callback"]
}
],
logout_url: System.get_env("AUTH0_LOGOUT_URL"),
logout_return_to_path: "/auth/logout"
]
config :hammer,
backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]}
config :block_scout_web, BlockScoutWeb.Guardian,
issuer: "block_scout_web",
secret_key: System.get_env("SECRET_KEY_GUARDIAN")
config :block_scout_web, BlockScoutWeb.Guardian, issuer: "block_scout_web"
config :guardian, Guardian.DB,
repo: Explorer.Repo,

@ -4,6 +4,17 @@ config :explorer, Explorer.ExchangeRates, enabled: false, store: :none
config :explorer, Explorer.KnownTokens, enabled: false, store: :none
config :ueberauth, Ueberauth.Strategy.Auth0.OAuth,
domain: "example.com",
client_id: "clien_id",
client_secret: "secrets"
config :ueberauth, Ueberauth,
logout_url: "example.com/logout",
logout_return_to_url: "example.com/return"
config :block_scout_web, BlockScoutWeb.Guardian, secret_key: "secret_key"
variant =
if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do
"parity"

@ -24,21 +24,12 @@ config :block_scout_web, BlockScoutWeb.Counters.BlocksIndexedCounter, enabled: f
config :block_scout_web, :captcha_helper, BlockScoutWeb.TestCaptchaHelper
config :ueberauth, Ueberauth.Strategy.Auth0.OAuth,
domain: "example.com",
client_id: "clien_id",
client_secret: "secrets"
config :ueberauth, Ueberauth,
providers: [
auth0: {
Ueberauth.Strategy.Auth0,
[callback_url: "example.com/callback"]
}
],
logout_url: "example.com/logout",
logout_return_to_url: "example.com/return"
]
config :block_scout_web, BlockScoutWeb.Guardian,
issuer: "block_scout_web",
secret_key: "secret_key"
config :block_scout_web, BlockScoutWeb.Guardian, issuer: "block_scout_web"

@ -35,6 +35,19 @@ config :block_scout_web, :footer,
### BlockScout Web ###
######################
# Configures Ueberauth's Auth0 auth provider
config :ueberauth, Ueberauth.Strategy.Auth0.OAuth,
domain: System.get_env("AUTH0_DOMAIN"),
client_id: System.get_env("AUTH0_CLIENT_ID"),
client_secret: System.get_env("AUTH0_CLIENT_SECRET")
# Configures Ueberauth local settings
config :ueberauth, Ueberauth,
logout_url: System.get_env("AUTH0_LOGOUT_URL"),
logout_return_to_url: System.get_env("AUTH0_LOGOUT_RETURN_URL")
config :block_scout_web, BlockScoutWeb.Guardian, secret_key: System.get_env("SECRET_KEY_GUARDIAN")
config :block_scout_web,
version: System.get_env("BLOCKSCOUT_VERSION"),
release_link: System.get_env("RELEASE_LINK"),

Loading…
Cancel
Save