title: Change layout of Facebook authentication button in asp.net Core MVC
body: <p>As a semester project, friends and I are working on a Planning application in ASP.NET Core MVC. We have enabled Facebook login, but the button is rather simple and I would like to be able to change the layout of the register-with-facebook button.</p>
  
  <p>We recently changed from ASP.NET Framework to Core, and in Framework I could change it in a file called _ExternalLoginListPartial.cshtml. I have looked around in all folders, but can't find the same or any other file related to have the same content of that file.</p>
  
  <p>The way I did it in Framework were like so</p>
  
  <pre><code>@foreach (AuthenticationDescription p in loginProviders)
  {
      switch (@p.AuthenticationType)
      {
          case "Facebook":
              &lt;button type="submit" class="btn btn-default facebookButton" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account"&gt;@p.AuthenticationType&lt;/button&gt;
              break;
             .
             .
           ..and so for other types..
      }
  }
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>@Chris Pratt gave a good solution: <a href="https://stackoverflow.com/questions/55377364/change-layout-of-facebook-authentication-button-in-asp-net-core-mvc/55377600#55377600">here</a> </p>
  
  <p>In the Login.cshtml from the Scaffolded items list, I made these changes:</p>
  
  <pre><code>@foreach (var provider in Model.ExternalLogins)
      {
      switch (@provider.DisplayName)
          {
              case "Facebook":
                    &lt;button type="submit" class="btn btn-default facebookButton" name="provider" value="@provider.Name" title="Log in using your @provider.DisplayName account"&gt;@provider.DisplayName&lt;/button&gt;
                    break;
          }
       }
  </code></pre>