Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use angular 4 login form to authenticate the app with IdentityServer 4

Is there a way to use a login form from my angular 4 application and post to the identityserver 4 project in order to authenticate the Angular app.

I'm using oidc-client in the Angular app

Actually, to authenticate the Angular App, the user is redirect to the Identity Server 4 project where the login form is sit, then return back to the angular app with the token. This token is saved and used to call Web API application.

Thanks a lot

like image 402
Jean-Francois Avatar asked Oct 18 '17 20:10

Jean-Francois


1 Answers

Below is my answer to the same question asked before:

Technically it is possible with "resource owner password flow", but in that model identity provider can not trust your application and will not create a session for your user. Thus such non-interactive approach is not truly SSO.
For 2019 the recommended flow for any web app such as Angular SPA is Code flow with PKCE extension, as described here or there.

like image 102
d_f Avatar answered Nov 07 '22 12:11

d_f