From c0ff1cb5e89bb0ec8a2964b97f3dadbf8d83034e Mon Sep 17 00:00:00 2001 From: snewcomer Date: Sat, 5 Jan 2019 13:37:18 -0800 Subject: [PATCH 1/7] Set json library on OAuth2 --- lib/ueberauth/strategy/google/oauth.ex | 5 ++++- mix.exs | 2 +- mix.lock | 11 ++++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/ueberauth/strategy/google/oauth.ex b/lib/ueberauth/strategy/google/oauth.ex index 0cec195..d4424cc 100644 --- a/lib/ueberauth/strategy/google/oauth.ex +++ b/lib/ueberauth/strategy/google/oauth.ex @@ -27,7 +27,10 @@ defmodule Ueberauth.Strategy.Google.OAuth do def client(opts \\ []) do config = Application.get_env(:ueberauth, __MODULE__, []) opts = @defaults |> Keyword.merge(opts) |> Keyword.merge(config) |> resolve_values() + json_library = Application.get_env(:ueberauth, :json_library) + OAuth2.Client.new(opts) + |> OAuth2.Client.put_serializer("application/json", json_library) end @doc """ @@ -76,7 +79,7 @@ defmodule Ueberauth.Strategy.Google.OAuth do {key, resolve_value(value)} end end - + defp resolve_value({m, f, a}) when is_atom(m) and is_atom(f), do: apply(m, f, a) defp resolve_value(v), do: v end diff --git a/mix.exs b/mix.exs index 6f9d8fe..a7108d1 100644 --- a/mix.exs +++ b/mix.exs @@ -25,7 +25,7 @@ defmodule UeberauthGoogle.Mixfile do defp deps do [ - {:oauth2, "~> 0.9"}, + {:oauth2, github: "scrogson/oauth2", branch: "register_serializers"}, {:ueberauth, "~> 0.4"}, {:credo, "~> 0.8", only: [:dev, :test]}, diff --git a/mix.lock b/mix.lock index de80c01..3bd8e19 100644 --- a/mix.lock +++ b/mix.lock @@ -1,20 +1,21 @@ %{ "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm"}, - "certifi": {:hex, :certifi, "1.2.1", "c3904f192bd5284e5b13f20db3ceac9626e14eeacfbb492e19583cf0e37b22be", [:rebar3], [], "hexpm"}, + "certifi": {:hex, :certifi, "2.3.1", "d0f424232390bf47d82da8478022301c561cf6445b5b5fb6a84d49a9e76d2639", [:rebar3], [{:parse_trans, "3.2.0", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm"}, "credo": {:hex, :credo, "0.8.4", "4e50acac058cf6292d6066e5b0d03da5e1483702e1ccde39abba385c9f03ead4", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}], "hexpm"}, "earmark": {:hex, :earmark, "1.0.1", "2c2cd903bfdc3de3f189bd9a8d4569a075b88a8981ded9a0d95672f6e2b63141", [:mix], [], "hexpm"}, "ex_doc": {:hex, :ex_doc, "0.13.2", "1059a588d2ad3ffab25a0b85c58abf08e437d3e7a9124ac255e1d15cec68ab79", [:mix], [{:earmark, "~> 1.0", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"}, - "hackney": {:hex, :hackney, "1.8.6", "21a725db3569b3fb11a6af17d5c5f654052ce9624219f1317e8639183de4a423", [:rebar3], [{:certifi, "1.2.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "5.0.2", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"}, + "hackney": {:hex, :hackney, "1.13.0", "24edc8cd2b28e1c652593833862435c80661834f6c9344e84b6a2255e7aeef03", [:rebar3], [{:certifi, "2.3.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "5.1.2", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"}, "httpoison": {:hex, :httpoison, "0.9.1", "6c2b4eaf2588a6f3ef29663d28c992531ca3f0bc832a97e0359bc822978e1c5d", [:mix], [{:hackney, "~> 1.6.0", [hex: :hackney, optional: false]}]}, - "idna": {:hex, :idna, "5.0.2", "ac203208ada855d95dc591a764b6e87259cb0e2a364218f215ad662daa8cd6b4", [:rebar3], [{:unicode_util_compat, "0.2.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"}, + "idna": {:hex, :idna, "5.1.2", "e21cb58a09f0228a9e0b95eaa1217f1bcfc31a1aaa6e1fdf2f53a33f7dbd9494", [:rebar3], [{:unicode_util_compat, "0.3.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm"}, "mime": {:hex, :mime, "1.0.1", "05c393850524767d13a53627df71beeebb016205eb43bfbd92d14d24ec7a1b51", [:mix], [], "hexpm"}, "mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], [], "hexpm"}, "mimetype_parser": {:hex, :mimetype_parser, "0.1.2", "221d2d3f727e89d80de5e1610fc2ce444514aa56f873da1b8fc9c033143e5d6a", [:mix], []}, - "oauth2": {:hex, :oauth2, "0.9.1", "cac86d87f35ec835bfe4c791263bdb88c0d8bf1617d64f555ede4e9d913e35ef", [:mix], [{:hackney, "~> 1.7", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm"}, + "oauth2": {:git, "https://github.com/scrogson/oauth2.git", "92aa2ea25e5df0e6c0fc89f7d918704f72b71988", [branch: "register_serializers"]}, + "parse_trans": {:hex, :parse_trans, "3.2.0", "2adfa4daf80c14dc36f522cf190eb5c4ee3e28008fc6394397c16f62a26258c2", [:rebar3], [], "hexpm"}, "plug": {:hex, :plug, "1.2.0", "496bef96634a49d7803ab2671482f0c5ce9ce0b7b9bc25bc0ae8e09859dd2004", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm"}, "poison": {:hex, :poison, "2.2.0", "4763b69a8a77bd77d26f477d196428b741261a761257ff1cf92753a0d4d24a63", [:mix], []}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.1", "28a4d65b7f59893bc2c7de786dec1e1555bd742d336043fe644ae956c3497fbe", [:make, :rebar], [], "hexpm"}, "ueberauth": {:hex, :ueberauth, "0.4.0", "bc72d5e5a7bdcbfcf28a756e34630816edabc926303bdce7e171f7ac7ffa4f91", [:mix], [{:plug, "~> 1.2", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"}, - "unicode_util_compat": {:hex, :unicode_util_compat, "0.2.0", "dbbccf6781821b1c0701845eaf966c9b6d83d7c3bfc65ca2b78b88b8678bfa35", [:rebar3], [], "hexpm"}, + "unicode_util_compat": {:hex, :unicode_util_compat, "0.3.1", "a1f612a7b512638634a603c8f401892afbf99b8ce93a45041f8aaca99cadb85e", [:rebar3], [], "hexpm"}, } From 43514034a35b0de07893a7f783a7a17c67a6dc2b Mon Sep 17 00:00:00 2001 From: snewcomer Date: Sat, 5 Jan 2019 22:46:04 -0800 Subject: [PATCH 2/7] use json_library hook. Need new release of ueberauth with new hooks --- mix.exs | 2 +- mix.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mix.exs b/mix.exs index a7108d1..d2a6b0c 100644 --- a/mix.exs +++ b/mix.exs @@ -26,7 +26,7 @@ defmodule UeberauthGoogle.Mixfile do defp deps do [ {:oauth2, github: "scrogson/oauth2", branch: "register_serializers"}, - {:ueberauth, "~> 0.4"}, + {:ueberauth, github: "ueberauth/ueberauth"}, {:credo, "~> 0.8", only: [:dev, :test]}, {:earmark, ">= 0.0.0", only: :dev}, diff --git a/mix.lock b/mix.lock index 3bd8e19..c4539c0 100644 --- a/mix.lock +++ b/mix.lock @@ -8,14 +8,14 @@ "httpoison": {:hex, :httpoison, "0.9.1", "6c2b4eaf2588a6f3ef29663d28c992531ca3f0bc832a97e0359bc822978e1c5d", [:mix], [{:hackney, "~> 1.6.0", [hex: :hackney, optional: false]}]}, "idna": {:hex, :idna, "5.1.2", "e21cb58a09f0228a9e0b95eaa1217f1bcfc31a1aaa6e1fdf2f53a33f7dbd9494", [:rebar3], [{:unicode_util_compat, "0.3.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm"}, - "mime": {:hex, :mime, "1.0.1", "05c393850524767d13a53627df71beeebb016205eb43bfbd92d14d24ec7a1b51", [:mix], [], "hexpm"}, + "mime": {:hex, :mime, "1.3.1", "30ce04ab3175b6ad0bdce0035cba77bba68b813d523d1aac73d9781b4d193cf8", [:mix], [], "hexpm"}, "mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], [], "hexpm"}, "mimetype_parser": {:hex, :mimetype_parser, "0.1.2", "221d2d3f727e89d80de5e1610fc2ce444514aa56f873da1b8fc9c033143e5d6a", [:mix], []}, "oauth2": {:git, "https://github.com/scrogson/oauth2.git", "92aa2ea25e5df0e6c0fc89f7d918704f72b71988", [branch: "register_serializers"]}, "parse_trans": {:hex, :parse_trans, "3.2.0", "2adfa4daf80c14dc36f522cf190eb5c4ee3e28008fc6394397c16f62a26258c2", [:rebar3], [], "hexpm"}, - "plug": {:hex, :plug, "1.2.0", "496bef96634a49d7803ab2671482f0c5ce9ce0b7b9bc25bc0ae8e09859dd2004", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm"}, + "plug": {:hex, :plug, "1.5.1", "1ff35bdecfb616f1a2b1c935ab5e4c47303f866cb929d2a76f0541e553a58165", [:mix], [{:cowboy, "~> 1.0.1 or ~> 1.1 or ~> 2.3", [hex: :cowboy, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm"}, "poison": {:hex, :poison, "2.2.0", "4763b69a8a77bd77d26f477d196428b741261a761257ff1cf92753a0d4d24a63", [:mix], []}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.1", "28a4d65b7f59893bc2c7de786dec1e1555bd742d336043fe644ae956c3497fbe", [:make, :rebar], [], "hexpm"}, - "ueberauth": {:hex, :ueberauth, "0.4.0", "bc72d5e5a7bdcbfcf28a756e34630816edabc926303bdce7e171f7ac7ffa4f91", [:mix], [{:plug, "~> 1.2", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"}, + "ueberauth": {:git, "https://github.com/ueberauth/ueberauth.git", "2087e031c3ff486e0aafb4684659a3e224d2aa29", []}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.3.1", "a1f612a7b512638634a603c8f401892afbf99b8ce93a45041f8aaca99cadb85e", [:rebar3], [], "hexpm"}, } From a728ae445b02c472dabf3995f5f660c28a514430 Mon Sep 17 00:00:00 2001 From: snewcomer Date: Fri, 15 Mar 2019 07:30:35 -0700 Subject: [PATCH 3/7] Update to latest ueberauth and oauth2 --- mix.exs | 4 ++-- mix.lock | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mix.exs b/mix.exs index d2a6b0c..3e19702 100644 --- a/mix.exs +++ b/mix.exs @@ -25,8 +25,8 @@ defmodule UeberauthGoogle.Mixfile do defp deps do [ - {:oauth2, github: "scrogson/oauth2", branch: "register_serializers"}, - {:ueberauth, github: "ueberauth/ueberauth"}, + {:oauth2, "~> 1.0.0"}, + {:ueberauth, "~> 0.6.0"}, {:credo, "~> 0.8", only: [:dev, :test]}, {:earmark, ">= 0.0.0", only: :dev}, diff --git a/mix.lock b/mix.lock index c4539c0..5ff23bf 100644 --- a/mix.lock +++ b/mix.lock @@ -11,11 +11,11 @@ "mime": {:hex, :mime, "1.3.1", "30ce04ab3175b6ad0bdce0035cba77bba68b813d523d1aac73d9781b4d193cf8", [:mix], [], "hexpm"}, "mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], [], "hexpm"}, "mimetype_parser": {:hex, :mimetype_parser, "0.1.2", "221d2d3f727e89d80de5e1610fc2ce444514aa56f873da1b8fc9c033143e5d6a", [:mix], []}, - "oauth2": {:git, "https://github.com/scrogson/oauth2.git", "92aa2ea25e5df0e6c0fc89f7d918704f72b71988", [branch: "register_serializers"]}, + "oauth2": {:hex, :oauth2, "1.0.0", "7ae134c369bb9f7e96ed9404d12f34e938daa14745f1601876526599be4c80f2", [:mix], [{:hackney, "~> 1.13.0", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm"}, "parse_trans": {:hex, :parse_trans, "3.2.0", "2adfa4daf80c14dc36f522cf190eb5c4ee3e28008fc6394397c16f62a26258c2", [:rebar3], [], "hexpm"}, "plug": {:hex, :plug, "1.5.1", "1ff35bdecfb616f1a2b1c935ab5e4c47303f866cb929d2a76f0541e553a58165", [:mix], [{:cowboy, "~> 1.0.1 or ~> 1.1 or ~> 2.3", [hex: :cowboy, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm"}, "poison": {:hex, :poison, "2.2.0", "4763b69a8a77bd77d26f477d196428b741261a761257ff1cf92753a0d4d24a63", [:mix], []}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.1", "28a4d65b7f59893bc2c7de786dec1e1555bd742d336043fe644ae956c3497fbe", [:make, :rebar], [], "hexpm"}, - "ueberauth": {:git, "https://github.com/ueberauth/ueberauth.git", "2087e031c3ff486e0aafb4684659a3e224d2aa29", []}, + "ueberauth": {:hex, :ueberauth, "0.6.1", "9e90d3337dddf38b1ca2753aca9b1e53d8a52b890191cdc55240247c89230412", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.3.1", "a1f612a7b512638634a603c8f401892afbf99b8ce93a45041f8aaca99cadb85e", [:rebar3], [], "hexpm"}, } From 6c1b38332954153ba8620612a5e8dc17b308ac58 Mon Sep 17 00:00:00 2001 From: snewcomer Date: Fri, 15 Mar 2019 07:32:17 -0700 Subject: [PATCH 4/7] removed unused deps from lockfile --- mix.lock | 3 --- 1 file changed, 3 deletions(-) diff --git a/mix.lock b/mix.lock index 5ff23bf..23f98f6 100644 --- a/mix.lock +++ b/mix.lock @@ -5,16 +5,13 @@ "earmark": {:hex, :earmark, "1.0.1", "2c2cd903bfdc3de3f189bd9a8d4569a075b88a8981ded9a0d95672f6e2b63141", [:mix], [], "hexpm"}, "ex_doc": {:hex, :ex_doc, "0.13.2", "1059a588d2ad3ffab25a0b85c58abf08e437d3e7a9124ac255e1d15cec68ab79", [:mix], [{:earmark, "~> 1.0", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"}, "hackney": {:hex, :hackney, "1.13.0", "24edc8cd2b28e1c652593833862435c80661834f6c9344e84b6a2255e7aeef03", [:rebar3], [{:certifi, "2.3.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "5.1.2", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"}, - "httpoison": {:hex, :httpoison, "0.9.1", "6c2b4eaf2588a6f3ef29663d28c992531ca3f0bc832a97e0359bc822978e1c5d", [:mix], [{:hackney, "~> 1.6.0", [hex: :hackney, optional: false]}]}, "idna": {:hex, :idna, "5.1.2", "e21cb58a09f0228a9e0b95eaa1217f1bcfc31a1aaa6e1fdf2f53a33f7dbd9494", [:rebar3], [{:unicode_util_compat, "0.3.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm"}, "mime": {:hex, :mime, "1.3.1", "30ce04ab3175b6ad0bdce0035cba77bba68b813d523d1aac73d9781b4d193cf8", [:mix], [], "hexpm"}, "mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], [], "hexpm"}, - "mimetype_parser": {:hex, :mimetype_parser, "0.1.2", "221d2d3f727e89d80de5e1610fc2ce444514aa56f873da1b8fc9c033143e5d6a", [:mix], []}, "oauth2": {:hex, :oauth2, "1.0.0", "7ae134c369bb9f7e96ed9404d12f34e938daa14745f1601876526599be4c80f2", [:mix], [{:hackney, "~> 1.13.0", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm"}, "parse_trans": {:hex, :parse_trans, "3.2.0", "2adfa4daf80c14dc36f522cf190eb5c4ee3e28008fc6394397c16f62a26258c2", [:rebar3], [], "hexpm"}, "plug": {:hex, :plug, "1.5.1", "1ff35bdecfb616f1a2b1c935ab5e4c47303f866cb929d2a76f0541e553a58165", [:mix], [{:cowboy, "~> 1.0.1 or ~> 1.1 or ~> 2.3", [hex: :cowboy, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm"}, - "poison": {:hex, :poison, "2.2.0", "4763b69a8a77bd77d26f477d196428b741261a761257ff1cf92753a0d4d24a63", [:mix], []}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.1", "28a4d65b7f59893bc2c7de786dec1e1555bd742d336043fe644ae956c3497fbe", [:make, :rebar], [], "hexpm"}, "ueberauth": {:hex, :ueberauth, "0.6.1", "9e90d3337dddf38b1ca2753aca9b1e53d8a52b890191cdc55240247c89230412", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.3.1", "a1f612a7b512638634a603c8f401892afbf99b8ce93a45041f8aaca99cadb85e", [:rebar3], [], "hexpm"}, From 381bc298dd769a4f85e6d4863a325688ce440c91 Mon Sep 17 00:00:00 2001 From: snewcomer Date: Fri, 15 Mar 2019 07:35:48 -0700 Subject: [PATCH 5/7] remove space --- lib/ueberauth/strategy/google/oauth.ex | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ueberauth/strategy/google/oauth.ex b/lib/ueberauth/strategy/google/oauth.ex index d4424cc..64bec93 100644 --- a/lib/ueberauth/strategy/google/oauth.ex +++ b/lib/ueberauth/strategy/google/oauth.ex @@ -79,7 +79,6 @@ defmodule Ueberauth.Strategy.Google.OAuth do {key, resolve_value(value)} end end - defp resolve_value({m, f, a}) when is_atom(m) and is_atom(f), do: apply(m, f, a) defp resolve_value(v), do: v end From 34fe5dc36edc0ad175aefe45185fc4ad4b56ffe2 Mon Sep 17 00:00:00 2001 From: snewcomer Date: Fri, 15 Mar 2019 07:37:18 -0700 Subject: [PATCH 6/7] Revert "remove space" This reverts commit 381bc298dd769a4f85e6d4863a325688ce440c91. --- lib/ueberauth/strategy/google/oauth.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ueberauth/strategy/google/oauth.ex b/lib/ueberauth/strategy/google/oauth.ex index 64bec93..d4424cc 100644 --- a/lib/ueberauth/strategy/google/oauth.ex +++ b/lib/ueberauth/strategy/google/oauth.ex @@ -79,6 +79,7 @@ defmodule Ueberauth.Strategy.Google.OAuth do {key, resolve_value(value)} end end + defp resolve_value({m, f, a}) when is_atom(m) and is_atom(f), do: apply(m, f, a) defp resolve_value(v), do: v end From 6525cb8f99adaccce264486923382f59be1ec14b Mon Sep 17 00:00:00 2001 From: snewcomer Date: Fri, 15 Mar 2019 10:36:00 -0700 Subject: [PATCH 7/7] actually use json_library method --- lib/ueberauth/strategy/google/oauth.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ueberauth/strategy/google/oauth.ex b/lib/ueberauth/strategy/google/oauth.ex index d4424cc..986ad9d 100644 --- a/lib/ueberauth/strategy/google/oauth.ex +++ b/lib/ueberauth/strategy/google/oauth.ex @@ -27,7 +27,7 @@ defmodule Ueberauth.Strategy.Google.OAuth do def client(opts \\ []) do config = Application.get_env(:ueberauth, __MODULE__, []) opts = @defaults |> Keyword.merge(opts) |> Keyword.merge(config) |> resolve_values() - json_library = Application.get_env(:ueberauth, :json_library) + json_library = Ueberauth.json_library() OAuth2.Client.new(opts) |> OAuth2.Client.put_serializer("application/json", json_library)