Skip to content
Snippets Groups Projects
Commit fd12e585 authored by lain's avatar lain
Browse files

Handle existing redirect params.

parent 1d3d66a8
Branches
No related tags found
No related merge requests found
......@@ -25,7 +25,8 @@ defmodule Pleroma.Web.OAuth.OAuthController do
auth: auth
}
else
url = "#{redirect_uri}?code=#{auth.token}"
connector = if String.contains?(redirect_uri, "?"), do: "&", else: "?"
url = "#{redirect_uri}#{connector}code=#{auth.token}"
url = if params["state"] do
url <> "&state=#{params["state"]}"
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment