-1
如何在使用ADB2C登录/注册后重定向到自定义页面?在ADB2C登录/注册后重定向到自定义页面 - MVC
我想填充我的模型,并把它传递给登入/注册后的新看法,但它一直重定向到以下几点:https://localhost:44342/account/signupsignin
下面是我的代码:
[AllowAnonymous]
public void SignUpSignIn()
{
// Use the default policy to process the sign up/sign in flow
if (!Request.IsAuthenticated)
{
try
{
HttpContext.GetOwinContext().Authentication.Challenge();
return;
}
catch (Exception ex)
{
}
}
string email = ((ClaimsIdentity)User.Identity).FindFirst("emails").Value;
// We do not want to use any existing identity information
EnsureLoggedOut();
AccountRegistrationModel ARVM = new AccountRegistrationModel();
ARVM = CallPersonalDetails(_registrationRepository.GetUserId(email), "English");
RedirectToAction("Account", "Register_PersonalDetails", ARVM);
//HttpContext.GetOwinContext().Authentication.Challenge(new AuthenticationProperties { RedirectUri = "/account/Register_PersonalDetails" }, OpenIdConnectAuthenticationDefaults.AuthenticationType);
//Response.Redirect("/");
}
我已经使用注释掉以及部分多数民众赞成尝试:
//HttpContext.GetOwinContext().Authentication.Challenge(new AuthenticationProperties { RedirectUri = "/account/Register_PersonalDetails" }, OpenIdConnectAuthenticationDefaults.AuthenticationType);
这个“显示”正确的URL,但显示一个页面,说其没有找到。我需要通过模型以及 - 我如何
- 重定向到我自己的自定义页面的登入/注册
- 后传递一个模型来此页为好。
感谢您的任何帮助提前。