This is one of the usecases I have highlighted all along for where LV shines. Imagine a registration form where you necessarily want to improve UX because it directly increases conversions. You want to give the user feedback as soon as possible when they are trying to sign up, so realtime validations are essential, but LV allows you to add it without bringing int a client side solution and all the baggage that comes with it. The outstanding issues with a full LiveView signin or registration form is the cookie session writing on login or sign up. This can’t happen over websockts so folks have two options.
- Use phx-change on the form, but allow the regular form post to hit a controller that performs
put_session - Use LV for phx-change and phx-submit, and perform a redirect to a session controller, with a signed token which is used to call
put_sessionto write the session
So LV is can be used here without any of the mentioned security issues. You are of course free to use regular controllers if that’s a better fit ![]()






















