add a javascript client to ideniityserver4 for login using the username and password

What you are trying to achieve will not be possible. IdentityServer4 is based on OAuth2 and the idea is that the user will not have to input his credentials inside your client application but only on the login page of the authorization authority.

mgr.signinRedirect() redirects the user to the login page of the authority where the user signs in. Throughout the complete login process your application itself does not handle the users credentials but only receives the token as a result. This is a base idea of OAuth2.

With the token then you will be still able to obtain the exposed user information with the mgr.getUser() function.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top