Open danish519 opened 4 years ago
I'm also having the same issue. Anyone found any solution for this ?
same issue
Same issue @danish519 have you found any solution to it?
same here
@ratnani1996 use this
use access_token which you get AccessToken.getCurrentAccessToken()
from here
logOut = (access_token) => { let logOut = new GraphRequest( "me/permissions/", { accessToken: access_token, httpMethod: 'DELETE' }, (error, result) => { console.log('LogOut Result---->>>', result); if (error) { console.log('Error fetching data: ' + error.toString()); } else { LoginManager.logOut(); } }); new GraphRequestManager().addRequest(logOut).start(); };
@crzycoder also using this not able to change account.
@kishansbs changing account is not possible in latest react-native-fbsdk
.
the method I mentioned is for select account again from facebook. it's select account only which you are sign in in facebook
app which is currently login. If you change account on facebook
app the sdk shows that account.
The method which i mentioned is only used for clear FBSDK cache forcefully.
@crzycoder thanks for the response, but it didn't work for me. I am unable to change my facebook account.
Has anyone found a solution for this? We can't get our Facebook login approved because the Facebook testers keep trying to sign in with an account from a previous session.
Does anybody have a solution? I can't remember the moment exactly, but I could switch the account after I changed the account in the safari in iOS simulator. But I doesn't work now.
Anyone found a solution for this, I'm currently using:
We have the same "issue". I did some investigations and I can tell you why it's impossible to get a logout working properly. It's not facebook's fault. Rather it is a security measure from Apple.
FBSDKCoreKit is using the most recent and recommended API provided by Apple: ASWebAuthenticationSession
.
It provides a secure and scoped session to login to third-party services, offering a secure callback to pass data back to the app.
As the ASWebAuthenticationSession
is capsuled from the app, the biggest implications are: The app is unable to read/modify/delete the session data (passwords and login data) from the hardened WebView.
Here you can see the API call:
I thought of possible workarounds. For instance, using the same authentication session store to call the logout endpoint. However, the API would request this alert, which is an inappropriate use case:
IMHO, there are only two methods to solve this issue:
Either Facebook solves this by integrating a logout button in their OAuth modal form:
Alternatively, Apple provides a secure way to clear cookies or web data from ASWebAuthenticationSession
. Obviously, this wouldn't leak any privacy information at all, it would just interfere with the Single-Sign-On Feature. However, they could scope the Session Deletion with the URL that is being called by the API.
Just saying.
Tl;dr Currently, there is no way to do achieve what we want.
I’m having the same issue. Log in dialog never prompts for email and password once the user logged in. Revoking permissions does no good.
Is there a workaround? I feel like it’s a big issue giving the user impression that he/she will and can never logs out.
Moreover, this logging out behavior might result in rejection in app review, and I don’t think it is fair.
Anyone found any solution to this problem?
Assuming noone solved this? I'm guessing it's related to this https://github.com/facebookarchive/facebook-swift-sdk/issues/215
Anyone found any solution to this problem?
if you are working on an iOS simulator and facing this issue, then you can reset your simulator using command xcrun simctl erase
xcrun simctl erase all
So far, this is the only solution that has helped me change the account to signing to Facebook. Thanks, @SahilPawar1994
Do we have any work around or any solution for this issue. We have tried clearing the cookies using @react-native-community/cookies when the user logs out of the app. But this didn't work in our case.
Any updates guys ???
Did anyone find the solution?
when i login to fbsdk it's work fine then i want to logOut which i used to
LoginManager.logOut()
that's what they mentioned to remove user cache . when i click facebook button again i'ts picks my previous account of facebook weather i login in web or app "and say continue with Danish Hussain". it should not ask me to login with another account.