@model NER.Models.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) { }

} } }