pow
pow copied to clipboard
Making after confirmation redirections configurable
For now, in https://github.com/augnustin/pow/blob/master/lib/extensions/email_confirmation/phoenix/controllers/confirmation_controller.ex redirection routes are hard coded:
defp redirect_to(conn) do
case Pow.Plug.current_user(conn) do
nil -> routes(conn).session_path(conn, :new)
_user -> routes(conn).registration_path(conn, :edit)
end
end
Shouldn't those be configurable just like after_sign_in_path etc.?
I haven't decided how extensions callback routes should work yet #141, and you can still override the routes by customizing path_for/5.