I created a LiveView project and generated authentication with phx.gen.auth
, I didn’t change any part of the auth code. Despite that, anytime I run the project, I get several warnings on the terminal saying there is no route path matching X (X being a ~p route that phx.gen.auth
generated) even though they are defined, for example, on the terminal I get:
warning: no route path for CabinetWeb.Router matches "/users/log_in"
lib/cabinet_web/live/user_registration_live.ex:14
But on my router.ex
I have:
scope "/", CabinetWeb do
pipe_through [:browser, :redirect_if_user_is_authenticated]
live_session :redirect_if_user_is_authenticated,
on_mount: [{CabinetWeb.UserAuth, :redirect_if_user_is_authenticated}] do
live "/users/register", UserRegistrationLive, :new
live "/users/log_in", UserLoginLive, :new
live "/users/reset_password", UserForgotPasswordLive, :new
live "/users/reset_password/:token", UserResetPasswordLive, :edit
end
post "/users/log_in", UserSessionController, :create
end