Search code examples
asp.net-coreidentityserver4

IdentityServer4, Login through my web application login page


I have web application that currently uses IdentityServer4 Sign In page to login and to generate token etc.

I want to change the flow and want to use my web application Sign In page to get login credentials and than seamlessly post/send the info to identityserver for authentication, token generation etc.

How can I achieve above?

Thanks in advance.


Solution

  • You can use resource owner password grant :

    http://docs.identityserver.io/en/aspnetcore1/quickstarts/2_resource_owner_passwords.html

    The OAuth 2.0 resource owner password grant allows a client to send username and password to the token service and get an access token back that represents that user.

    But resource owner password grant only for "trusted" (or legacy) applications. And is not recommended for security reasons .