通过客户端SDK Facebook验证

编程入门 行业动态 更新时间:2024-10-25 12:28:37
本文介绍了通过客户端SDK Facebook验证 - 安全观的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想我不完全理解Facebook的OAuth的API处理身份验证的方式。据我了解,它的工作原理基本上是这样的(客户端是一款Android手机,我的服务器标准的LAMP-设置):

I think I don't fully understand the way the facebook OAuth-API handles authentication. As far as I understand, it works basically like this (client being an Android phone, my server a standard LAMP-setup):

现在的问题是,客户当然也可以通过提交一个错误的用户ID,以我的服务器假冒步数3 - 如果我的服务器响应请求的 server/getConfidentialData.php?fbID=%FBID% 和用户设法得到别人的FB-用户ID,他可能只是将其写入请求,他会得到属于别人的数据。

Now the issue is, the client can of course fake step number 3 by submitting a wrong userID to my server - for example if my server responds to the request server/getConfidentialData.php?fbID=%FBID% , and the user manages to get the fb-userID of someone else, he could just put that into the request and he'd get the data that belongs to someone else.

如果我使用的PHP-SDK,怎么能知道我的用户是否登录在Android的App或不?

If I use the PHP-SDK, how can it know whether my user is logged in in the Android-App or not?

是,这是应该在上班的路上,还是我失去了一些东西?

Is that the way it's supposed to work, or am I missing something?

谢谢,大卫。

Thanks, David.

推荐答案

唯一真正的解决办法:

您有私人用户数据的服务器,而不是一切都在Facebook上的那一刻,你需要做的服务器端登录这并不难实现,一旦你了解了流程。

The moment you have a server with private user data and not everything is on Facebook, you need to do the server-side login which is not hard to implement once you understand the flow.

在检查实图,并按照他们在这个例子中提供的指引,你是好去。

Check the diagram at Facebook and follow the guidelines they provide in this example and you are good to go.

developers.facebook/docs/howtos /登录/服务器端的登录/

更多推荐

通过客户端SDK Facebook验证

本文发布于:2023-11-16 04:30:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1600999.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:客户端   SDK   Facebook

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!