When integrating Facebook login into an AngularJS application, how can we securely hide sensitive credentials like appid and secretkey in the code snippet below?
window.fbAsyncInit = function() {
FB.init({
appId: 'YOUR_APP_ID_HERE',
cookie: true,
xfbml: true,
channelUrl: 'YOUR_RETURN_URL_HERE',
oauth: true
});
};
(function() {
var e = document.createElement('script');
e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
},
{scope: 'YOUR_FB_PERMISSIONS_HERE'});
}