Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Identity Server 3 login via Javascript without redirect

Thinktecture Identity server has a good sample of logging in via the JavaScript client at https://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/Clients/JavaScriptImplicitClient

However, this particular example redirects the browser to the actual Identity Server URL (https://identityserverurl/login?signin=guidhere).

Is there a way to login via JavaScript without redirecting the browser and instead using JavaScript/Ajax calls? The primary intent is to better control the login flow for a single page application, which in some cases is also embedded in the HTML of another URL.

like image 526
Aquaboltar Avatar asked Oct 19 '22 08:10

Aquaboltar


1 Answers

try resource owner credential flow that way u can use ur custome login flow..In that flow all u need is to hit the endpoints with username, password and in return u will get the token data(u can also include refresh token). Resource owner credential flow should only be used for trusted client applications. e.g., dropdox wind 8 app

like image 167
Atul Chaudhary Avatar answered Jan 04 '23 05:01

Atul Chaudhary