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.
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