I'm responsible for implementing a solution for allowing a mobile app to connect to a web API. I found IdentityServer3 and have started working with it. I'm still very new to this and am having trouble understanding a few things:
- How to you allow a user to sign-in to the server? What is the process? I found the following article, which discusses the endpoints for performing authorization and various parameters that can be used, but not really sure how to authenticate users. My goal is to have the identityserver3 do the authentication, return a token, and allow a mobile application client use that token to access a web API.
https://identityserver.github.io/Documentation/docsv2/endpoints/authorization.html
GET /connect/authorize?client_id=client1&scope=openid email api1&response_type=id_token token&redirect_uri=https://myapp/callback&state=abc&nonce=xyz
- I've noticed that there are a few examples of how to actually setup the identity server. I've gone through the walk-through for each one, and am having trouble understanding various OAuth 2.0 ideas:
a.) Should I allow my users to use the Resource Owner flow if they are a mobile app? b.) Should I allow my users to use other flows if all I want them to be able to do is login with a username and password?
- How do I accomplish 2.a?
Thanks.
EDIT:
I've scoured stack overflow, Identity Server 3 and I wasn't sure how OAuth 2.0 flows are supposed to work...truthfully, I've researched textbooks and was originally just going to do the above without IdentityServer3 at all, but after more research, I found that the correct approach to securing a web api is using Open ID Connect to properly perform Authentication, as OAuth 2.0 only performs Authorization, which is why I chose IdentityServer3 in the first place. I don't completely understand OAuth 2.0 and Identity Server 3 (and am still new to SO, so please bear with me) so if my question is missing information or it looks like I was just lazy, feel free to post it in the comments and I'll provide you with some of my work in this regard.