Use a session for state parameter in Ueberauth callback controller

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-04-28 11:44:07 +02:00
parent 82255b46eb
commit f997f573ba
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -7,6 +7,14 @@ defmodule Mobilizon.Web.AuthController do
require Logger require Logger
plug(:put_layout, false) 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)
)
plug(Ueberauth) plug(Ueberauth)
@spec request(Plug.Conn.t(), map()) :: Plug.Conn.t() @spec request(Plug.Conn.t(), map()) :: Plug.Conn.t()