开发者

Prevent Facebook Login when using Facebook OAuth connect

开发者 https://www.devze.com 2023-03-27 23:05 出处:网络
I have a web site that uses Facebook Graph API and connects users using the OAuth access point. Now the problem is that if user does Facebook Connect he\'s signed in to the Facebook too.

I have a web site that uses Facebook Graph API and connects users using the OAuth access point. Now the problem is that if user does Facebook Connect he's signed in to the Facebook too.

I'm wondering if it would be possible with current OAuth to only do the connect without logging user in to Facebook?

This is a bit problematic because user might think that he开发者_StackOverflow中文版 has only logged in our application and accidentally leaves the facebook login open. To prevent this I'm currently logging users out of Facebook too upon logout, but this is hardly an ideal case.


A user must be logged into their Facebook account to use the Connect features, as that is how Facebook authenticates the user and ensures the information passed between your website (Facebook Connect) and Facebook's APIs is valid and from the current user's session who is trying to access your site.


To log in using OAuth they are required to log in to Facebook, but if your app requests the offline_access permission, you can still use the Graph API functionality after the user logs out of facebook. So you could log them out of Facebook as soon as they sign in, but this could have the unfortunate side-effect of signing out users who were already signed in, and wanted to stay signed in using your app.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号