fix: only scope reset/register paths if they are set

This commit is contained in:
Zach Daniel 2024-08-07 23:02:41 -04:00
parent e30be539b0
commit 661712de6e

View file

@ -190,8 +190,8 @@ defmodule AshAuthentication.Phoenix.Router do
"overrides" => unquote(overrides),
"otp_app" => unquote(otp_app),
"path" => Phoenix.Router.scoped_path(__MODULE__, unquote(path)),
"reset_path" => Phoenix.Router.scoped_path(__MODULE__, unquote(reset_path)),
"register_path" => Phoenix.Router.scoped_path(__MODULE__, unquote(register_path))
"reset_path" => unquote(reset_path) && Phoenix.Router.scoped_path(__MODULE__, unquote(reset_path)),
"register_path" => unquote(register_path) && Phoenix.Router.scoped_path(__MODULE__, unquote(register_path))
}
]},
on_mount: on_mount