0

We are going to have multiple apps (an ASP.NET MVC website application and iOS, Android apps). We need all versions of our software to allow users to register and login, no matter what version of the app they are using. So I've been tasked with creating an ASP.NET Web API REST service that will register and authenticate users and return a token. As a web developer, I'll also be working on the MVC site that will call this web service. All the examples I see use Google/Facebook to authenticate users, but I don't want that. I want to use my web service instead, where the data for users will be stored in a SQL Server DB.

How do I go about creating this web service? Is there any sample code out there that does this? I don't care about Facebook or Google logins...our logins are internal only and should be stored in SQL. Please help! :)

Also, should the authentication web service be separate from the web service that returns report data within the consuming apps? I'd prefer the service to handle it all as the database will be the same.

Renan Araújo
  • 3,533
  • 11
  • 39
  • 49
Andy
  • 1,243
  • 3
  • 22
  • 40
  • You should ask one question. And the answer is, of course, it depends! You need to decide how the service will authenticate the user, that determines how you'll build it. Basic or Digest or windows, etc. Search around for web service authentication. You certainly don't need Facebook or Google. – Andy Wiesendanger Sep 10 '15 at 16:05

2 Answers2

1

Hi Here are some great links and hope it helps you:

http://www.asp.net/aspnet/overview/owin-and-katana/owin-oauth-20-authorization-server

http://www.codeproject.com/Tips/372422/Secure-WCF-RESTful-service-using-OAUTH

And also previously asked on StackOverflow: How to implement oauth2 server in ASP.NET MVC 5 and WEB API 2

Community
  • 1
  • 1
radkan
  • 599
  • 4
  • 9
0

There are multiple options for this.

  1. using OpenAuth/OpenId
  2. using SSO( single sign on)
  3. Active Directory Federation Services (ADFS)
  4. Centralized authentication (https://stormpath.com/blog/sso-vs-centralized-auth)

Refer this posts also

C# ASP.NET Single Sign-On Implementation

Step-By-Step: Setting up AD FS and Enabling Single Sign-On to Office 365

Community
  • 1
  • 1
Adersh M
  • 596
  • 3
  • 19