# TODO: ask eric about naming defmodule PlugParadoxAuth.SetGoogleAuth do def init(options) do # initialize options options end def call(conn, %{"code" => code}) do IO.inspect "PlugParadoxAuth.SetGoogleAuth.set_session" IO.inspect conn IO.puts code # Handle error case? {:ok, token} = ElixirAuthGoogle.get_token(code, conn) {:ok, profile} = ElixirAuthGoogle.get_user_profile(token.access_token) IO.inspect profile conn end end