When reading about live view, I read this from José:
Why would the login be an horrible idea for LiveView?
And, as a more general question, how should session be managed when using LiveView. For regular app, and API endpoints, I usually just have a
require_user plug that check the session for a
user_id and retrieve the corresponding user from the database. My login action just
|> put_session("user_id", user.id) after a successful login.
How would this work with LiveView?