Zaf*_*san 10 .net-core asp.net-core openiddict
我已将opeiddict构建为单独的Web应用程序作为授权服务器.我遇到了一个小问题,就是我可以通过客户端Web应用程序的链接直接进入用户注册页面.现在我可以进入登录页面,作为示例示例:
public ActionResult SignIn() {
// Instruct the OIDC client middleware to redirect the user agent to the identity provider.
// Note: the authenticationType parameter must match the value configured in Startup.cs
return new ChallengeResult(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties {
RedirectUri = "/"
});
}
Run Code Online (Sandbox Code Playgroud)
有没有办法从客户端应用程序转到身份验证服务器帐户/注册?
看来你可以在重定向中设置 url。请参阅以下片段:
[AllowAnonymous]
public IActionResult SignIn()
{
return new ChallengeResult(
OpenIdConnectDefaults.AuthenticationScheme,
new AuthenticationProperties
{
IsPersistent = true,
RedirectUri = Url.Action("SignInCallback", "Account")
});
}
Run Code Online (Sandbox Code Playgroud)
请参阅此处的文档:启动身份验证流程
| 归档时间: |
|
| 查看次数: |
264 次 |
| 最近记录: |