1

I am wondering what the best (most efficient, best practice, etc.) way to implement an user login using Angular 2, for the client side, and ASP.NET Core for the backend. I have seen various ways of implementing this type of project but I have not come across a definitive answer.

Specifically, if I have a seperate Angular 2 application, should I create an API for user login/registration that is also a tokenizer and then create a seperate business logic API? Or should I combine the two and have one, do-it-all, API for the web app? Thank you!

2
  • 1
    It all depends on your requirements. Do you just want to authenticate with ASP.Net Identity or you also need OpenID authentication? Commented Mar 14, 2017 at 22:37
  • @Win I am thinking about just using Identity but I do not have enough experience with it to determine if that is the best solution. What are your thoughts? Would you recommend using Identity or something like Auth0? What benefit would OpenID provide on top of Identity? Also, if I went with just the Identity route, would you recommend seperating that from the business logic? Thank you! Commented Mar 14, 2017 at 22:52

1 Answer 1

2

You can use either ASP.Net Identity or OpenID authentication, or both.

If you want more control over Authentication and Authorization, you want to use ASP.Net Identity. However, it is not uncommon to see both authentication methods in a lot of website these days.

Valerio De Sanctis explains both authentication methods in his ASP.NET Core and Angular 2 book. I highly recommend you to use read this book if you plan to implement authentication in ASP.NET Core and Angular 2. Here is my review on this book at Amazon.

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.