DavidReid
DavidReid

Reputation: 449

WCF Autethentication User Google / Facebook etc

I am looking to build a SOA application which will essentially consist of the core WCF service. An ASP.NET Webforms front end. And, potentially multiple mobile front ends.

I'd like to allow my users to log in with their Facebook / Google credentials which is quite simple for the ASP.NET Webforms app these days. However, I would also like the mobile applications to authenticate using the same credentials.

To Achieve this, I expect that every call to the WCF service must use a similar claims based approach to the authentication.

Having searched for hours, I was wondering if anybody could point me at a tutorial which demonstrates creating / configuring the WCF service to work specifically with either Facebook / Google claims based authentication.

Thanks David

Upvotes: 4

Views: 1092

Answers (2)

Paulo Segundo
Paulo Segundo

Reputation: 448

You can do it very easy using http://fbconnectauth.codeplex.com/

Facebook Connect Authentication for ASP.NET is a component that allows ASP.NET web developers to identify and validate users accessing their website or web services using Facebook Connect.

It is written in C#, targeted at .NET 2.0.

But this is only for facebook integration.

Upvotes: 1

Seymour
Seymour

Reputation: 7067

Suggest you consider Google Accounts Authentication and Authorization, which utilizes the OAuth 2.0 standard. The following link describes how to use the Google API to authenticate a web server application with OAuth 2.0.

The authorization sequence begins when your application redirects a browser to a Google URL; the URL includes query parameters that indicate the type of access being requested. As in other scenarios, Google handles user authentication, session selection, and user consent. The result is an authorization code, which Google returns to your application in a query string.

https://developers.google.com/accounts/docs/OAuth2WebServer

The Google API supports common OAuth 2.0 scenarios such as those for web server, installed, and client-side applications.

OAuth 2.0 is a relatively simple protocol. To begin, you obtain OAuth 2.0 credentials from the Google Developers Console. Then your client application requests an access token from the Google Authorization Server, extracts a token from the response, and sends the token to the Google API that you want to access.

https://developers.google.com/accounts/docs/OAuth2

The Google API Client Library for .NET, along with a full example, is available via the following link: https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth

Upvotes: 2

Related Questions