I am very new to Elixir and Phoenix, I am trying to authenticate my application using {:comeonin, "~> 4.0"} and {:guardian, "~> 1.0"} and have a helper function that checks if the user is logged in:
defmodule Chatter.ViewHelper do
def current_user(conn), do: Guardian.Plug.current_resource(conn)
def logged_in?(conn) do
Guardian.Plug.authenticated?(conn)
end
end
But I get this error:
** (UndefinedFunctionError) function Guardian.Plug.authenticated?/1 is undefined or private.