Passing second parameter to render function in phoenix

You probably want this as:

%{data: render(Catastore.SessionView, "session.json", %{jwt: jwt, user: user})}