pow-auth / pow

Robust, modular, and extendable user authentication system
https://powauth.com
MIT License
1.61k stars 160 forks source link

Making after confirmation redirections configurable #436

Open augnustin opened 4 years ago

augnustin commented 4 years ago

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.?

danschultzer commented 4 years ago

I haven't decided how extensions callback routes should work yet #141, and you can still override the routes by customizing path_for/5.