[英]New custom login page when use Azure AD as
I am trying to use custom login page when using Azure AD but until now without success. 我在使用Azure AD时尝试使用自定义登录页面,但直到现在都没有成功。 I don't want to customize the login page offered by Azure, I want to use completely new login page. 我不想自定义Azure提供的登录页面,我想使用全新的登录页面。 Is this possible? 这可能吗?
I found some possible answers ( Redirect user to custom login page when using Azure AD and Azure AD B2C - Populate username in custom login page ) but and the owner of these questions still doesn't find the correct answer. 我找到了一些可能的答案( 使用Azure AD和Azure AD B2C 时将用户重定向到自定义登录页面 - 在自定义登录页面中填充用户名 ),但这些问题的所有者仍然找不到正确的答案。
The customization options of Azure AD are limited to branding and some text fields. Azure AD的自定义选项仅限于品牌和一些文本字段。 Azure AD B2C offers much more UI customization options: https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-reference-ui-customization . Azure AD B2C提供了更多UI自定义选项: https : //docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-reference-ui-customization 。
It works by you providing a link to the HTML you would like to use on the page. 它的工作原理是提供您要在页面上使用的HTML的链接。 You will need to put a single empty div element there though, where B2C will insert its content. 您需要在那里放置一个空的div元素,其中B2C将插入其内容。 You can use CSS to customize how they look. 您可以使用CSS来自定义它们的外观。 JavaScript is not allowed though for security reasons. 出于安全原因,不允许使用JavaScript。
Though this probably should not be your decision point when deciding between Azure AD and Azure AD B2C since they are pretty different products. 虽然在决定Azure AD和Azure AD B2C之间这可能不是您的决定点,因为它们是完全不同的产品。 B2C is meant for customer-facing applications, while Azure AD is for apps used by organizations. B2C适用于面向客户的应用程序,而Azure AD适用于组织使用的应用程序。
I found this, 我找到了这个,
https://azure.microsoft.com/en-gb/resources/samples/active-directory-dotnet-native-headless/ https://azure.microsoft.com/en-gb/resources/samples/active-directory-dotnet-native-headless/
Basically you want to be able to authenticate with Azure AD directly and pass the token to the signed in user. 基本上,您希望能够直接使用Azure AD进行身份验证,并将令牌传递给已登录的用户。
Looks like the code you need is in the file 看起来您需要的代码在文件中
active-directory-dotnet-native-headless-master/TodoListClient/Program.cs 有源目录的dotnet天然-无头主/ TodoListClient / Program.cs中
Hope it helps 希望能帮助到你
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.