1

I currently have two web applications, one of which is a web api, which both have it's own implementation of ASP.NET Identity for authenticating users (first one is cookie and second one is bearer tokens). I need, in the near future, to add a third web site to the family and was thinking to move the authentication logic in a standalone web application which could serve all the orhers.

For example: instead of authenticating to www.mysite.com and/or api.mysite.com, I would like that both the applications could authenticate against a new website, like e.g. login.mysite.com, as microsoft does.

How can I achieve something like this? Does somebody has any direction to start with?

3
  • Look in to OpenID, that will give you what you are looking for. Stack Overflow is using it, that's how you get to log in with your google account on this site without them having anything to do with each other. Commented Aug 16, 2015 at 22:50
  • @ScottChamberlain: thanks for your answer but I think you've missed the real question (or I did,nt explained correctly, probably). I am happy with identity. I just need to move the authentication logic into another we app, which then will serve existing apps solely for the authentication. Iwas looking for some directions on how to implement the necessary redirects and general architecture. Commented Aug 16, 2015 at 22:56
  • See this answer: stackoverflow.com/questions/26309792/… Commented Aug 16, 2015 at 23:54

1 Answer 1

1

What you need is an Identity Server which will authenticate the requests and give you back an access token. You can then use the access token to make subsequent requests to APIs and websites etc. As long as the access token is valid you will be able to make requests. There is great .net based open source solution available for Identity Server. Have a look at Thinktecture. You can download the source and demo projects to try yourself.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.