redirectUrl issue (not working)

Hello,

When I attempt to use redirectUrl:

http://localhost:5000/Login?redirectUrl=%2Frfe-view-edit%2F6%2Fapproval

It still redirects to the start page. When authenticated:

http://localhost:5000/rfe-view-edit/6/approval

Loads the page correctly. I'm using 2.65.7

What did I miss?

We can't reproduce such a problem. Redirecting occurs as expected. You can try debugging the Login method of the AccountController class. It ends with:

            if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(password))
            {

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

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

The code return Redirect($"~/{redirectUrl}"); performs the redirect after login.

When I debug the project the redirectUrl is null:

I created a new application as a test and have the same issue. I am using "Active Directory" for security.

That's probably the cause. Try replacing the meta\login.json file with the one attached. It should include the steps required to propagate redirectUrl to the login action.
login.json.zip (814 Bytes)

1 Like

That worked and indeed it was missing the redirect action.

Thanks for your help!