I have a live view where I show a post with comments. Users can post a comment if they’re logged in, and the live view redirects them to the login page otherwise. I’ve generated the authentication stuff with phx_gen_auth, so the login page is a controller which accepts a conn. My redirecting from the live view works fine, but I’d like to be able to include a :redirect_to assign in the conn, so it can return to the post page once a user’s logged in.
Is there a way to set assigns onto the conn when using the Phoenix.LiveView.redirect
function?