Comments (12)
Thanks for doing that, I had seen this comment but didn't occur to move it over.
I also edited the issue including a workaround for development-only while using the iOS simulator.
from react-native-fbsdk-next.
If you copy the issue, you should copy the most important comment from the issue as well I think, which shows that either Facebook needs to change their OAuth form (out of this module's control) or Apple needs to change things so you can delete cookies in the hardened OAuth WebView's scope (out of this module's control)
The old issue had no issue links indicating anyone had requested either thing from either vendor so current status here is same as current status on the old link
No status - nobody working on it. You (that is: anyone reading this) could work on it!
All the rest is from @SmartArray
facebookarchive/react-native-fbsdk#712 (comment)
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.
Here is why:
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:
Apples ASWebAuthenticationSession Sign In Alert
IMHO, there are only two methods to solve this issue:
Possible Workaround by Facebook
Either Facebook solves this by integrating a logout button in their OAuth modal form:
Facebook Oauth Form 'Sign In with another account' button proposal
Solution by Apple
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.
from react-native-fbsdk-next.
Not sure about iOS but I managed to clear the cache on my Android phone through Chrome which seems to allow me to log in with a different account. Would still be nice for the user to be able to do that easily from the log in page so I submitted a feature request to the facebook-sdk repo. Hopefully they see it haha
from react-native-fbsdk-next.
Same for me. Any updates?
I need to remove the cached FB user account after logout. LoginManager.logOut()
doesn't work.
from react-native-fbsdk-next.
I will leave it closed for now, as there is no tangible action on our side.
If someone comes with any news about this getting fixed by Facebook or Apple we can reopened :)
Thanks for including the workaround o/
from react-native-fbsdk-next.
Possible that this might be the way to enable account change:
facebook/facebook-ios-sdk#2000
Raised the issue on ios-sdk as this is the case, basically since iOS 13+ it's possible to request running ASWebAuthenticationSession
with prefersEphemeralWebBrowserSession
set to true, but the api would have to expose that or give some interface to request that.
from react-native-fbsdk-next.
Interesting @kolboch I wonder if you patched facebook-ios-sdk locally if it would work? Historically I have been able to patch things like that via a cocoapods post-install hook that either directly edited source files in place via sed or by calling the system patch
binary on a file and applying a patch similar to how patch-package works. A PR to that repo would be better than an issue in other words - and may stand a good chance of being merged, then maybe we could make progress here
from react-native-fbsdk-next.
Hi @mikehardy , thanks for your comment, didn't know it's possible as I recently switched to ios but would try to make it. There seem to be some contributing guide in facebook-ios-sdk, I hope it would go well :)
from react-native-fbsdk-next.
Same for me. Any updates?
It's open source, the updates you see are the updates you've got: https://hackernoon.com/i-thought-i-understood-open-source-i-was-wrong-cf54999c097b
@Reykjavik151 if this is an important use case for you / your app / your company, pursue it with whatever resources you can, and post your updates here
from react-native-fbsdk-next.
it still not work
from react-native-fbsdk-next.
I have the same issue in android too😩
from react-native-fbsdk-next.
I have the same issue in android too😩
I also have the same issue with android also @lukkimo. I would describe it as a feature rather than an issue as this is by the design of Meta/Facebook and is working as intended to acheive a persisent login. With this being said, Facebook seems to offer no work around for a developer or test user to "Sign in with another account" or successfully remove login cache to facilitate a complete logout process. This feature seems to be geared around creating a pain-free UX while disregarding test users and developers. Currently still in search of a fix for android at this time
from react-native-fbsdk-next.
Related Issues (20)
- Build error: Showing Recent Messages Error [ERR_REQUIRE_ESM]: require() of ES Module... HOT 2
- support version 17 of facebook sdk with privacy manifests HOT 14
- Will this lib be updated to meet Apple's new third party sdk privacy manifest requirement? HOT 2
- Can't change to another account on login HOT 3
- iOS limited login HOT 14
- Email not retrieving from facebook login HOT 3
- Need help for the facebook sharing HOT 1
- Facebook SDK not initialized error when using react-native-fbsdk-next with Expo HOT 7
- FbLoginManager.loginwithPermissions was called with 1 arguments butt expects 3 arguments HOT 2
- LoginManager.logOut() doesn't remove app from Facebook "Business Integrations" HOT 1
- App switches automatically to limited login when updated to v13 HOT 4
- Access Token is invalid HOT 6
- React native app - Upgrade fbsdk to version 9.0.0 HOT 1
- Mobile product ads aka Advantage+ Catalog Ads not receiving params HOT 2
- Upgrading to v13.0.0 , build failed for android HOT 6
- iOS limited login does not return all possible fields HOT 1
- Invalid ID token from login response. HOT 3
- (iOS) ShareDialog.show(shareContent) does not show any sharing options. HOT 1
- (iOS) Automatic purchase event is not logging in iOS sdk 17.0.0 HOT 3
- Compiling for iOS 13.0, but module 'ExpoModulesCore' has a minimum deployment target of iOS 13.4 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-fbsdk-next.