Login Component/Generated - small issues

Generated code has a runtime error when both Username and Password are left blank. Can add a simple null test as follows, and blanks will fall through to "Invalid user or password":

        if (user != null)
        {
            if (!user.EmailConfirmed)
            {
                return Redirect("~/Login?error=User email not confirmed");
            }

            var result = await signInManager.PasswordSignInAsync(userName, password, false, false);

            if (result.Succeeded)
            {
                return Redirect("~/");
            }
        }

        return Redirect("~/Login?error=Invalid user or password");

However, with this code added, I still do not see the error text appear?

We have fixed those in the upcoming Radzen release 2.20.5

Release is now live. To apply the fix you need to regenerate the Login page:

  1. Delete the Login page from the Page list (right click, delete).
  2. Open the security option in Radzen (top right corner)
  3. Make sure the Auto generate pages for user and role management is checked
  4. Click Save

Radzen will regenerate the updated login page which contains logic for displaying the error message.

The AccountController is also updated to check for the presence of userName and password.