Skip to content

Commit fa2513b

Browse files
committed
Fix query param ordering by using keyword lists instead of maps
1 parent 2cf421b commit fa2513b

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

lib/elixir_auth_google.ex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ defmodule ElixirAuthGoogle do
8080
"""
8181
@spec generate_oauth_url(String.t()) :: String.t()
8282
def generate_oauth_url(url) when is_binary(url) do
83-
query = %{
83+
query = [
8484
client_id: google_client_id(),
85-
scope: google_scope(),
86-
redirect_uri: generate_redirect_uri(url)
87-
}
85+
redirect_uri: generate_redirect_uri(url),
86+
scope: google_scope()
87+
]
8888

8989
params = URI.encode_query(query, :rfc3986)
9090

@@ -93,11 +93,11 @@ defmodule ElixirAuthGoogle do
9393

9494
@spec generate_oauth_url(conn) :: String.t()
9595
def generate_oauth_url(conn) when is_map(conn) do
96-
query = %{
96+
query = [
9797
client_id: google_client_id(),
98-
scope: google_scope(),
99-
redirect_uri: generate_redirect_uri(conn)
100-
}
98+
redirect_uri: generate_redirect_uri(conn),
99+
scope: google_scope()
100+
]
101101

102102
params = URI.encode_query(query, :rfc3986)
103103

0 commit comments

Comments
 (0)