Using authentication and authorization. Using token based authentication. setting proper CORS.