I have an Asp.net application hosted on one domain say abc.com and I have another MVC Web API hosted on a different domain say api.abc.com.
Now from the web application(abc.com), I am making a javascript ajax call to my web api endpoint(api.abc.com/getproducts) which is not the same domain. So what are the different mechanism i can use to authenticate the API calls made to api endpoint? The goal is to secure api so can avoid unauthenticated calls and also avoid unnecessarily complex structure.
Is it good practice to make web API call from javascript? via Ajax request.