Could Facebook page Accesstoken and Signed Request be exposed in client side aka javascript. ? is it a good option to store in db or in memory on server?
FB.login(function (response) {
if (response.authResponse) {
FB.api('/me/permissions', function (perms_response) {
call to server with this response..
}
});
} else {
// User cancelled login or did not fully authorize.
}
}, { scope: 'manage_pages' }
);
Question is the response.authResponse.accessToken, response.authResponse.userID, response.authResponse.signedRequest are visible at the client or this needs to done in server side as well
Of course you can, what's the difference?
Its just that these shouldn't be requested from the client-side since client-side is exposed.
The app access token is just like a password to your app, if it gets leaked to someone, he can edit/destroy/do anything with your app!
So what you are trying to do is NOT recommended.
To get the App Access Token-
You can get it directly from here: https://developers.facebook.com/tools/accesstoken/
You can make a call here to get that-