My goal is to establish a secure connection with a REST service using Angular. I have come across the official method, which involves setting the authentication ticket like this:
$httpProvider.defaults.headers.common['Authorization'] = 'dhfkssksk';
But I can't help but wonder if this approach is insecure because anyone could potentially access the JavaScript and uncover the authentication code.