- I can get get access token from postman oauth 2. Same way i was tried to generate token in angular js with redirect url, client id ... etc.
- But i not able to do and also i don't know how?
- I was created identity server 4 API sample with auth server. Now i want to get token from my angular app.
But i need this flow in angular js. I tried this below code
angular.module("trainingApp")
.controller('loginController', ['$scope', function ($scope) {
function login(){
var client_id="testproduct";
var client_secret="test@123";
var scope="testAPI";
var redirect_uri="http://localhost:9000";
var response_type="token";
var url="http://localhost:1215/connect/authorize?scope="+scope+"&client_id="+client_id+"&client_secret="+client_secret+"&redirect_uri=http://localhost:9000"+redirect_uri+"&grant_type=authorization_code"+
"&response_type="+response_type;
window.location.replace(url);
};
login();
}])
Access to XMLHttpRequest at 'localhost:1215/connect/…' from origin 'localhost:9000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
But i am get UI for Login. Help ???? :)


