I am totally new to AngularJS and token based authentication. Actually I would like to use AngularJS framework as my front-end while API as back-end. Thus, I have followed some tutorial from internet and I have attached my code in https://github.com/mmSebastian/angularjsWebAPI .
When I try to login my web app, I face below error in my browsers:
- Firefox
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http: //localhost:50987/token. (Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘(null)’).
- Chrome
Failed to load http: //localhost:50987/token: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed. Origin "http: //localhost:52386" is therefore not allowed access.
- Edge
SEC7128: Multiple Access-Control-Allow-Origin headers are not allowed for CORS response.
However, it works fine when I run http: //localhost:50987/token through Postman.
I have tried below links but still couldn't solve it. Kindly help on this.