diff --git a/CHANGELOG.md b/CHANGELOG.md index c83f7d2..16676a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## (Unreleased) +## v0.12.0 + +* Add support to hl param in handle_request! [102](https://github.com/ueberauth/ueberauth_google/pull/102) + ## v0.11.0 * Allow using a function to generate the client secret [101](https://github.com/ueberauth/ueberauth_google/pull/101) diff --git a/lib/ueberauth/strategy/google.ex b/lib/ueberauth/strategy/google.ex index 765fdbf..d185d4c 100644 --- a/lib/ueberauth/strategy/google.ex +++ b/lib/ueberauth/strategy/google.ex @@ -29,6 +29,7 @@ defmodule Ueberauth.Strategy.Google do |> with_param(:access_type, conn) |> with_param(:prompt, conn) |> with_param(:login_hint, conn) + |> with_param(:hl, conn) |> with_state_param(conn) opts = oauth_client_options_from_conn(conn) diff --git a/mix.exs b/mix.exs index 369f18b..671993e 100644 --- a/mix.exs +++ b/mix.exs @@ -2,7 +2,7 @@ defmodule UeberauthGoogle.Mixfile do use Mix.Project @source_url "https://github.com/ueberauth/ueberauth_google" - @version "0.11.0" + @version "0.12.0" def project do [ diff --git a/test/strategy/google_test.exs b/test/strategy/google_test.exs index 0105c94..234a880 100644 --- a/test/strategy/google_test.exs +++ b/test/strategy/google_test.exs @@ -68,7 +68,7 @@ defmodule Ueberauth.Strategy.GoogleTest do end test "handle_request! redirects to appropriate auth uri" do - conn = conn(:get, "/auth/google", %{}) + conn = conn(:get, "/auth/google", %{hl: "es"}) # Make sure the hd and scope params are included for good measure routes = Ueberauth.init() |> set_options(conn, hd: "example.com", default_scope: "email openid") @@ -86,7 +86,8 @@ defmodule Ueberauth.Strategy.GoogleTest do "redirect_uri" => "http://www.example.com/auth/google/callback", "response_type" => "code", "scope" => "email openid", - "hd" => "example.com" + "hd" => "example.com", + "hl" => "es" } = Plug.Conn.Query.decode(redirect_uri.query) end