Skip to content

Commit ad1de54

Browse files
authored
Merge pull request #102 from alejandrodevs/master
Add support to hl param in authorization URL
2 parents fcfc954 + 91784d8 commit ad1de54

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## (Unreleased)
44

5+
## v0.12.0
6+
7+
* Add support to hl param in handle_request! [102](https://github.com/ueberauth/ueberauth_google/pull/102)
8+
59
## v0.11.0
610

711
* Allow using a function to generate the client secret [101](https://github.com/ueberauth/ueberauth_google/pull/101)

lib/ueberauth/strategy/google.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ defmodule Ueberauth.Strategy.Google do
2929
|> with_param(:access_type, conn)
3030
|> with_param(:prompt, conn)
3131
|> with_param(:login_hint, conn)
32+
|> with_param(:hl, conn)
3233
|> with_state_param(conn)
3334

3435
opts = oauth_client_options_from_conn(conn)

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule UeberauthGoogle.Mixfile do
22
use Mix.Project
33

44
@source_url "https://github.com/ueberauth/ueberauth_google"
5-
@version "0.11.0"
5+
@version "0.12.0"
66

77
def project do
88
[

test/strategy/google_test.exs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ defmodule Ueberauth.Strategy.GoogleTest do
6868
end
6969

7070
test "handle_request! redirects to appropriate auth uri" do
71-
conn = conn(:get, "/auth/google", %{})
71+
conn = conn(:get, "/auth/google", %{hl: "es"})
7272
# Make sure the hd and scope params are included for good measure
7373
routes = Ueberauth.init() |> set_options(conn, hd: "example.com", default_scope: "email openid")
7474

@@ -86,7 +86,8 @@ defmodule Ueberauth.Strategy.GoogleTest do
8686
"redirect_uri" => "http://www.example.com/auth/google/callback",
8787
"response_type" => "code",
8888
"scope" => "email openid",
89-
"hd" => "example.com"
89+
"hd" => "example.com",
90+
"hl" => "es"
9091
} = Plug.Conn.Query.decode(redirect_uri.query)
9192
end
9293

0 commit comments

Comments
 (0)