Facebook身份验证中客户端和服务器端有什么不同?
问题描述:
在Facebook Authentication,他们说:Facebook身份验证中客户端和服务器端有什么不同?
Facebook平台支持两种不同的OAuth 2.0用户登录流量:服务器端(已知为在说明书中的认证码流)和客户端(已知作为隐含流)。无论何时您需要从Web服务器调用Graph API,都会使用服务器端流程。当您需要从客户端调用Graph API时,使用客户端流程,例如在Web浏览器中运行的JavaScript或原生移动或桌面应用程序。
但是,正是服务器端和客户端认证之间的区别。 因为当我使用使用JS API的signed_request
并将它传递给服务器时,它有时会过期。
FB.getLoginStatus(function(response){
if (response.authResponse && response.authResponse.signedRequest)
{
$.get(url,{
'signed_request':response.authResponse.signedRequest
},
function(data){
//The server response that the signed_request is expired.
}
}
});
的可能的复制[?应该在什么时候服务器端与客户端的Facebook验证流程中使用(https://stackoverflow.com/问题/ 8142717 /时 - 应该最服务器端-VS-客户端 - Facebook的认证流待使用) – charsi 2017-09-15 08:28:13