-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
45 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export [email protected] | ||
export AUTH_API_KEY=2PzB7PPnpuLsbWmWtXpGyI+kfSQSQ1zUW2Atz/+8PdZuSEJzHgzGnJWV35nTKRwx | ||
export EMAIL_APP_URL=https://dwylmail.herokuapp.com | ||
export GITHUB_CLIENT_ID=CreateGitHubApp | ||
export GITHUB_CLIENT_SECRET=SuperSecret | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,16 +28,18 @@ defmodule AuthWeb.PageControllerTest do | |
end | ||
|
||
test "google_handler/2 show welcome (state=nil) > handler/3", %{conn: conn} do | ||
data = %{ | ||
email: "[email protected]", | ||
givenName: "McTestin", | ||
picture: "https://youtu.be/naoknj1ebqI", | ||
auth_provider: "google" | ||
} | ||
person = Auth.Person.create_person(data) # |> IO.inspect(label: "person") | ||
conn = AuthPlug.create_jwt_session(conn, Map.merge(data, %{id: person.id})) | ||
conn = get(conn, "/auth/google/callback", | ||
%{code: "234", state: nil}) | ||
# IO.inspect(System.get_env("AUTH_API_KEY"), label: "AUTH_API_KEY") | ||
IO.inspect(AuthPlug.Token.client_id(), label: "AuthPlug.Token.client_id()") | ||
# data = %{ | ||
# email: "[email protected]", | ||
# givenName: "McTestin", | ||
# picture: "https://youtu.be/naoknj1ebqI", | ||
# auth_provider: "google" | ||
# } | ||
# person = Auth.Person.create_person(data) |> IO.inspect(label: "person") | ||
# conn = AuthPlug.create_jwt_session(conn, Map.merge(data, %{id: person.id})) | ||
# |> IO.inspect(label: "conn") | ||
conn = get(conn, "/auth/google/callback", %{code: "234", state: nil}) | ||
|
||
assert html_response(conn, 200) =~ "google account" | ||
# assert html_response(conn, 302) =~ "redirected" | ||
|