Is it possible to implement log_in with LiveView for the code generated with phx.gen.auth
?
How should we approach this?
phx.gen.auth
already works with LiveView, what issues are you facing with it?
I am looking at a way to move login route also to LiveView. Session is not accessible for LiveView. I am looking at workaround & best practice for implementing signin as a LiveRoute.
there is a recent discussion on the same topic:
A Phoenix application, using Phx.Gen.Auth, has a publicly accessible LiveView (Auth) for handling a signup/login process. It has another authorized-only LiveView (App) for the internals of the application. It it possible for the user to be seamlessly redirected from Auth to App? If so, how would the session cookie be set on the user’s browser?
The normal way of doing this is to use a Phoenix.Controller, since it has access to a full HTTP request/response and we can use renew_session/1 and put_s…
1 Like
Thanks @derek-zhou - Missed that discussion.