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
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)
@spec request(Plug.Conn.t(), map()) :: Plug.Conn.t()