@model FHT.Agency.UI.ViewModels.ExternalLoginListViewModel
@using Microsoft.Owin.Security
使用其他服务登录。
@{
var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes();
if (loginProviders.Count() == 0) {
没有配置外部身份验证服务。有关设置此 ASP.NET 应用程序
以支持通过外部服务登录的详细信息,请参阅此文。
}
else {
using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) {
@Html.AntiForgeryToken()
@foreach (AuthenticationDescription p in loginProviders) {
}
}
}
}
@foreach (AuthenticationDescription p in loginProviders) { }