Pow needs no small amount of steps to set up properly inside a project. Without an example GitHub project that demonstrates the problem, it’s hard for anyone to try and help.
Adding PowEmailConfirmation.Plug.confirm_email/2 to show/2 function in confirmation_controller.ex solved my issue.
I’ve followed your mentioned guide as well, which didn’t work. Then after reading around, I modified the show/2 function as following:
case PowEmailConfirmation.Plug.load_user_by_token(conn, token) do
{:error, conn} ->
conn
|> put_status(401)
|> json(%{error: %{status: 401, message: "Invalid confirmation code"}})
{:ok, conn} ->
# Extra bit starting
case PowEmailConfirmation.Plug.confirm_email(conn, %{}) do
{:ok, _, conn} ->
conn
|> json(%{success: %{message: "Email confirmed"}})
{:error, _, conn} ->
conn
|> put_status(401)
|> json(%{error: %{status: 401, message: "Invalid confirmation code"}})
end
# Extra bit ending
end
end