Fix depreciated calls of fetch_env!/2 and get_env/2

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-09-21 08:53:50 +02:00
parent 655ae4f9a1
commit bbbaa81a6e
10 changed files with 45 additions and 27 deletions

View File

@@ -8,12 +8,10 @@ defmodule Mobilizon.Web.AuthController do
require Logger
plug(:put_layout, false)
config = Application.get_env(:mobilizon, Mobilizon.Web.Endpoint, [])
plug(Plug.Session,
store: :cookie,
key: "_auth_callback",
signing_salt: Keyword.get(config, :secret_key_base)
signing_salt: Keyword.get(endpoint_config, :secret_key_base)
)
plug(Ueberauth)
@@ -142,4 +140,8 @@ defmodule Mobilizon.Web.AuthController do
defp redirect_to_error(conn, :unknown_error, provider_name) do
redirect(conn, to: "/login?code=Error with Login Provider&provider=#{provider_name}")
end
defp endpoint_config do
Application.get_env(:mobilizon, Mobilizon.Web.Endpoint, [])
end
end