facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 907 forks source link

Reauthentication implementation not available #507

Open zagoa opened 5 years ago

zagoa commented 5 years ago

🐛 Bug Report

When I logout facebook and then login again thought facebook I want to be able to force the user to reauthentificate.

To Reproduce

Just logout of your application and login again. You will have no choice of the user and you will be connected as the previous user.

Expected Behavior

I expect a thing like describe in this facebook post. But I don't find any methods availables to do this. https://developers.facebook.com/docs/facebook-login/reauthentication/

Code Example

My actual code to logout a user :

FBLogout = (accessToken) => {
        let logout =
            new GraphRequest(
                "me/permissions/",
                {
                    accessToken: accessToken,
                    httpMethod: 'DELETE'
                },
                (error, result) => {
                    if (error) {
                        console.log('Error fetching data: ' + error.toString());
                    } else {
                        LoginManager.logOut();
                    }
                });
        new GraphRequestManager().addRequest(logout).start();
    };

Environment

Android 9

Mlobaievskyi commented 5 years ago
Note
The Android and iOS SDKs don't currently support re-authentication.
zagoa commented 5 years ago

Ok thanks for the information. Where I can find the road map of the Android and IOS SDK ?

FunkyLambda commented 5 years ago

Bump.

So in the meant time, do we just submit our apps using setLoginBehavior('web') and have them rejected by Apple for poor user experience, like they did for this person: https://stackoverflow.com/questions/48120291/how-do-i-implement-facebook-login-with-sfauthenticationsession-or-sfsafariviewco

sourabhdadapure commented 4 years ago

any updates ?

ebouJ commented 3 years ago

any update on this?

sherry2610 commented 3 years ago

Any update on this?