In this quick post, we will see how to customize, oAuth Login UI in ASP.NET 4.5 and MVC 4.
One of the common requirements with oAuth login is that displaying respective provider’s logo or image.

In ASP.NET 4.5 and MVC 4, we can register oAuth provider in App_Start/AuthConfig.cs file and here we can also pass additional data to oAuth provider if any. We can use this extra data dictionary to pass oAuth provider’s image url to view and based on it we can display image for respective provider.

As we can see in above code snippet that we are passing Icon url with extra data. So we can now access this Icon url from view. Open Views/Account/_ExternalLoginsListPartial.cshtml and replace the classic button markup with below code snippet.

Now run the application by pressing F5 and wow we have brand new login UI for oAuth provider.
ASP.NET MVC 4 Hosting start from $3.00/month. Check it out for more information!!