summaryrefslogtreecommitdiff
path: root/Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-03-20 16:45:17 -0400
committerMichael <[email protected]>2017-03-20 16:45:17 -0400
commitcdc61eb4ea5309769ad4db84d92594e4dc3dff67 (patch)
treea8297a7aecc4376f07a497a5e02ab5ff165bfbd3 /Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml
parentd9f475e1f33bbf39ca0d79d7a6b0c2fd501b4f2d (diff)
downloadproject-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.gz
project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.bz2
project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.zip
Initial commit (azure deploy test)
Diffstat (limited to 'Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml')
-rw-r--r--Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml28
1 files changed, 28 insertions, 0 deletions
diff --git a/Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml b/Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml
new file mode 100644
index 0000000..8b85588
--- /dev/null
+++ b/Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml
@@ -0,0 +1,28 @@
+@model Project_Unite.Models.ExternalLoginListViewModel
+@using Microsoft.Owin.Security
+
+<h4>Use another service to log in.</h4>
+<hr />
+@{
+ var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes();
+ if (loginProviders.Count() == 0) {
+ <div>
+ <p>
+ There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=403804">this article</a>
+ for details on setting up this ASP.NET application to support logging in via external services.
+ </p>
+ </div>
+ }
+ else {
+ using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) {
+ @Html.AntiForgeryToken()
+ <div id="socialLoginList">
+ <p>
+ @foreach (AuthenticationDescription p in loginProviders) {
+ <button type="submit" class="btn btn-default" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account">@p.AuthenticationType</button>
+ }
+ </p>
+ </div>
+ }
+ }
+}