首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何向microsoft-identity-web提供login_hint

如何向microsoft-identity-web提供login_hint
EN

Stack Overflow用户
提问于 2021-02-16 02:29:41
回答 1查看 40关注 0票数 0

我正在结合使用microsoft- identity -web (https://github.com/AzureAD/microsoft-identity-web)和IdentityServer4,以便能够使用AAD帐户通过identity server4登录我的应用程序。一切都运行得很好。

我想知道是否有可能向microsoft-identity-web提供一个login_hint,以便可以预先填写微软的登录表单的名称字段。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-08-28 09:59:49

事实证明,您可以通过向身份验证属性提供登录提示,将用户名传递给外部身份验证流,如下所示:

代码语言:javascript
复制
// start challenge and roundtrip the return URL and scheme 
var props = new AuthenticationProperties
{
   RedirectUri = redirectUrl,
   Items = {{"provider", provider.AuthenticationScheme}},
   Parameters = {{ "login_hint", <user name to display in login screen>}}
};
return Challenge(props, provider.AuthenticationScheme);

有关如何使用外部身份提供商(如微软)进行签名的信息,请参阅http://docs.identityserver.io/en/latest/topics/signin_external_providers.html

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66213466

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档