当唯一的选择是第三方时,是否可以跳过登录页面?

Sco*_*ert 1 identityserver3

我有一个场景,一组用户只能通过第三方登录进行身份验证。是否可以传递一个额外的参数来跳过登录页面并自动将用户重定向到第 3 方登录页面并避免按下第 3 方的按钮?

lea*_*ege 6

有几种方法可以影响登录工作流程。

客户端应用程序可以包含对 IdentityServer 使用哪个外部提供程序的提示 - 这是通过参数acr_values(idp:name_of_ext_idp) 完成的。

https://identityserver.github.io/Documentation/docsv2/endpoints/authorization.html

您还可以为每个客户端静态配置 ext 提供程序(设置EnableLocalLogin为 false,并IdentityProviderRestrictions设置为 ext. 提供程序的名称)。

https://identityserver.github.io/Documentation/docsv2/configuration/clients.html

此外,您还可以处理PreAuthenticateAsync用户服务上的方法并动态设置Idp服务上的属性SignInMessage

https://identityserver.github.io/Documentation/docsv2/advanced/userService.html