Skip to content

Commit

Permalink
mix format
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed May 18, 2023
1 parent f8ed251 commit 7ae05b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/elixir_auth_google.ex
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,15 @@ defmodule ElixirAuthGoogle do
@spec get_token(String.t(), conn) :: {:ok, map} | {:error, any}
def get_token(code, conn) when is_map(conn) do
redirect_uri = generate_redirect_uri(conn)

inject_poison().post(@google_token_url, req_body(code, redirect_uri))
|> parse_body_response()
end

@spec get_token(String.t(), url) :: {:ok, map} | {:error, any}
def get_token(code, url) when is_binary(url) do
def get_token(code, url) when is_binary(url) do
redirect_uri = generate_redirect_uri(url)

inject_poison().post(@google_token_url, req_body(code, redirect_uri))
|> parse_body_response()
end
Expand Down
1 change: 0 additions & 1 deletion test/elixir_auth_google_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ defmodule ElixirAuthGoogleTest do
assert ElixirAuthGoogle.generate_oauth_url(url) =~ auth_url
end


test "generate_oauth_url(url) with scheme e.g. https://gcal.fly.dev #94" do
no_scheme = "gcal.fly.dev"
url = "https://#{no_scheme}"
Expand Down

0 comments on commit 7ae05b5

Please sign in to comment.