Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/ueberauth/strategy/linear.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ defmodule Ueberauth.Strategy.Linear do
[]
|> with_scopes(conn)
|> with_state_param(conn)
|> with_optional(:prompt, conn)
|> with_optional(:actor, conn)
|> Keyword.put(:redirect_uri, callback_url)

module = option(conn, :oauth2_module)
Expand Down Expand Up @@ -165,6 +167,10 @@ defmodule Ueberauth.Strategy.Linear do
Keyword.get(options(conn), key, Keyword.get(default_options(), key))
end

defp with_optional(opts, key, conn) do
if option(conn, key), do: Keyword.put(opts, key, option(conn, key)), else: opts
end

defp get_redirect_uri(%Plug.Conn{} = conn) do
config = Application.get_env(:ueberauth, Ueberauth)

Expand Down