Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.AspNet.Membership.OpenAuth;

namespace ContosoUniversity
{
    internal static class AuthConfig
    {
        public static void RegisterOpenAuth()
        {
             See http://go.microsoft.com/fwlink/?LinkId=252803 for details on setting up this ASP.NET
             application to support logging in via external services.

            OpenAuth.AuthenticationClients.AddTwitter(
                consumerKey: "your Twitter consumer key",
                consumerSecret: "your Twitter consumer secret");

            OpenAuth.AuthenticationClients.AddFacebook(
              appId: "XXXXXXXXXXXXX",
            appSecret: "XXXXXXXXXXXXXXXXX");

            OpenAuth.AuthenticationClients.AddMicrosoft(
                clientId: "your Microsoft account client id",
                clientSecret: "your Microsoft account client secret");

            OpenAuth.AuthenticationClients.AddGoogle();
        }
    }
}
Posted
Updated 12-Jan-15 21:25pm
v2
Comments
Sergey Alexandrovich Kryukov 13-Jan-15 0:31am    
What does it mean?
You don't know how to write "namespace Membership;" or what?
—SA
CPallini 13-Jan-15 3:30am    
Please elaborate.

1 solution

Development is not a course that you can pass but searching the internet, and copy and pasting what you find. That approach won't work, because development requires that you think about what you find and adapt it to fit your needs.

In the case of the "code fragment" above, that is clearly not something you have done: some of it is not code, but instructions as to what you have to do in order to get it working. Others are chunks that are clearly meant to to replace by you with specific information - and anyone who read that instead of pasting blindly would have realised that, so I can only assume that you can't be bothered, and want us to do it all for you.

We are not here to do your homework. This approach will not get you through your course, will certainly not help you pass an exam at the end of it, and if it did work would be a very bad model to try and use in the real world. Try that in any job and you won't last long!
So...try it yourself. Think about your task, and what you have found and try to work out what you need to do. If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900