Use Windows Live Authentication on your personal web site

Many people wonder how to restrict access to their web site, which might contain personal information including photos and videos of private functions. Usually, they would want to restrict access to a group of friends or to members of family.

Instead of going all the way to implement your own authentication mechanism to achieve this, Windows Live ID provides a much simpler solution.

Step 1:

Go to this site: https://msm.live.com/app/default.aspx and register your application by providing an application name, a return URL (The url that Live authentication page with return to with a token after the authentication is complete) and a 16-64 character Secret Key (which is shared between you and Windows Live)

Step 2:

Display Windows Live Id SIGN-IN link on your page. You can do this by using the code given on this page

http://msdn2.microsoft.com/en-us/library/bb676638.aspx

Step 3:

After a user signs in using the Sign in link created above in step 2, Windows Live will redirect the user to your website (specifically to the return URL) with an encrypted token embedded in the POST response.

You have to store this token and use ProcessLogin function provided by Windows Live ID SDK, to parse, decrypt and validate the authentication token.

Details including exact methods, sample code and additional functions are available at

http://msdn2.microsoft.com/en-us/library/bb676640.aspx

Though it does sound a little complicated, it should be much simpler than sitting down and beginning to implementing a whole authentication platform. Besides,

The advantages of this approach are

1. You don’t have to deal with implementing authentication, storing passwords, access policies etc.

2. Your users will not have to go through a separate sign up process.

3. Most users already have a Windows Live/hotmail account

Go ahead, make your web site safe and protect it against unwanted users.

Keep your family even closer!

Download a quickstart web authentication application here

http://www.microsoft.com/downloads/details.aspx?FamilyId=8BA187E5-3630-437D-AFDF-59AB699A483D&displaylang=en

Leave a Reply