From 661712de6e78fbc06cb96dd754ea3e6919e493d4 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Wed, 7 Aug 2024 23:02:41 -0400 Subject: [PATCH] fix: only scope reset/register paths if they are set --- lib/ash_authentication_phoenix/router.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ash_authentication_phoenix/router.ex b/lib/ash_authentication_phoenix/router.ex index 7f76fef..9ff9495 100644 --- a/lib/ash_authentication_phoenix/router.ex +++ b/lib/ash_authentication_phoenix/router.ex @@ -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