Add a login With Facebook or Google button to your site. Open Source, easily expandable to support more oauth providers.
INSTALLATION
1. Install Package
2. Replace YOURAPPID / YOURCLIENTID with your App Id / Client ID in CoopOauthFacebook / CoopOauthGooglePlus partial view.
3. Create an "OauthMember" Member Type with exactly that name and the following seven properties exactly (Sorry, umbraco did not let me package member types):
Name (Alias), Type
Provider (provider), Type: Textstring
Oauth Id (oauthId), Type: Textstring
Access Token (accessToken), Type: Textstring
First Name (firstName), Type: Textstring
Last Name (lastName), Type: Textstring
Picture (picture), Type: Textstring
4. Add the following keys to your Web.config appSettings:
<add key="CoopOauth_FacebookAppId" value="YOURAPPID" />
<add key="CoopOauth_FacebookAppSecret" value="YOURAPPSECRET" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
Example Member Information In View
var m = CoopRelay.Relay.Member.Current;
<h4>Welcome</h4> <span>@Html.ActionLink("Log out", "Logout", "OauthSurface")</span>
<img class="profile" src= "@m.Properties.GetString("picture")" alt="@m.Name" /> @Html.Raw(m.Name)