asp.net - How to authenticate an angularJS application with ExternalProvider as well as local authentication -


i have angularjs (/asp.net core api) application uses identityserver4 authenticate users using ropc flow (first party trust). have new requirement authenticate users (in addition local store) using external providers such google , ad. various identityserver samples have come across uses identityserver independent sts, i.e., there redirection angularjs app mvc based app either user authenticated using local user store, or, external provider (ex: https://github.com/identityserver/identityserver4.samples/tree/release/quickstarts). requirement implement externalauthentication within angularjs app.

note: in identityserver4.samples when client tries access protected api redirection url generated , login method of accountcontroller called, here there few redirection shown below:

[httpget] public async task<iactionresult> login(string returnurl) {     var vm = await _account.buildloginviewmodelasync(returnurl); 

called when user clicks on 1 of external provider button (ex: google):

[httpget] public async task<iactionresult> externallogin(string provider, string returnurl) {     returnurl = url.action("externallogincallback", new { returnurl = returnurl }); 

called once user authenticated external provider (ex google): here possible map users local store, , generate local idsrvr token,

[httpget] public async task<iactionresult> externallogincallback(string returnurl) { 

i wondering if feasible accomplish above flow in angularjs, if so, please guide me how accomplish above 3. sample reference helpful.

thanks.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -