Hi all, working with LiveView
and the code generated by phx.gen.live
. I’m also working with code generated by phx_gen_auth
for my authentication.
I’m trying to use the functions defined in UserAuth
from phx_gen_auth
to manage authentication on a LiveView
. I looked through the code of UserAuth
and saw that it expects sesions to be of type Plug.Conn
.
However, it seems that LiveView
is using a basic Map
. In particular, I looked at the parameters of the function
def mount(_params, session, socket)
of a LiveView and inspected the session
parameter.
Should it be using Plug.Conn
?
If not, how would I convert a Map
to Plug.Conn
so I can use the functions defined in UserAuth
?
Cheers!