简体   繁体   English

Azure AD自定义登录页面

[英]Azure AD custom login page

I have gone through this link for customizing the user login page in Azure AD, but on one documentation page, microsoft have shown login page like this我已经通过这个链接在 Azure AD 中自定义用户登录页面,但是在一个文档页面上,微软已经显示了这样的登录页面像这样

How can we achieve this?我们怎样才能做到这一点?

The page you've linked to ( link ) walks you through how to set up a custom design and associate that to your B2C journey.您链接到的页面 ( 链接) 将引导您完成如何设置自定义设计并将其与您的 B2C 旅程相关联。

You need to write your own HTML page(s) and CSS then host that yourself along with any images, fonts, etc just like you would with a normal web page, we normally refer to those as page templates.您需要编写自己的 HTML 页面和 CSS,然后自己将其与任何图像、fonts 等一起托管,就像使用普通的 web 页面一样,我们通常将它们称为页面模板。

You also need to specify in B2C that your policies will use those page templates when it's rendering its own pages for your users and the linked page walks you through that.您还需要在 B2C 中指定,当它为您的用户呈现自己的页面时,您的策略将使用这些页面模板,并且链接页面将引导您完成该操作。 Your page templates will need a specific element in them ( <div id="api"></div> ) that B2C will insert its content into (based on your B2C policies) when it renders its pages using those templates.您的页面模板将需要其中的特定元素 ( <div id="api"></div> ),当 B2C 使用这些模板呈现其页面时,B2C 会将其内容插入其中(根据您的 B2C 策略)。

In the example you've shown in your screenshot there will be a HTML page that has that image set as its background (likely using CSS) and a white box in the center for B2C to insert its content into.在您在屏幕截图中显示的示例中,将有一个 HTML 页面,该页面将该图像设置为其背景(可能使用 CSS),并且中心有一个白框供 B2C 插入其内容。 It will then use CSS (and maybe some Javascript) to style the content B2C inserts onto the page.然后它将使用 CSS(可能还有一些 Javascript)来设置 B2C 插入到页面上的内容的样式。

If you want to see exactly how that page is built you can go to the Woodgrove Demo site, sign in with your personal account and that will take you to that page which you can then inspect in your browser.如果您想确切地查看该页面是如何构建的,您可以拨打 go 到Woodgrove 演示站点,使用您的个人帐户登录,这将带您进入该页面,然后您可以在浏览器中查看该页面。

If you have your browser's.network window open when you sign in with your personal account then you should see B2C loading that page template from somewhere after its initial page load.如果您在使用个人帐户登录时打开了浏览器的.network window,那么您应该会看到 B2C 在初始页面加载后从某处加载该页面模板。 That's because it then uses Javascript to combine that template with its page content to render the final page.这是因为它随后使用 Javascript 将该模板与其页面内容组合以呈现最终页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM