facebook-android-sdk icon indicating copy to clipboard operation
facebook-android-sdk copied to clipboard

LoginManager.logOut() not working

Open sabafromwandio opened this issue 7 years ago • 9 comments

I use default login manager like LoginManager.getInstance(), then login and logout , but when i check token after logout like this AccessToken.getCurrentAccessToken() it still exists

sabafromwandio avatar Sep 16 '19 09:09 sabafromwandio

I heve the same issue

Rasalexman avatar Sep 20 '19 12:09 Rasalexman

Hi @sabafromwandio , @Rasalexman , which version of SDK are you using? I cannot reproduce the issue, it would be better if you can share example code.

KylinChang avatar Sep 22 '19 20:09 KylinChang

I use default login manager like LoginManager.getInstance(), then login and logout , but when i check token after logout like this AccessToken.getCurrentAccessToken() it still exists

thanakitskp avatar Sep 27 '19 23:09 thanakitskp

Hi @thanakitskp , do you use the latest version(v5.5.1) of SDK?

KylinChang avatar Sep 30 '19 18:09 KylinChang

I have the same issue both on Android and iOS I use the latest sdK 5.8.0 in iOS and 5.9.0 in Android. LoginManager.getInstance() does not work. This issue has been lingering for a time now and the ticket posted in facebook-iOS-sdk github has even been archived without any hints on how to solve the problem. They however said that this was due to cookies in browsers that save token authentication data that gets automatically reused each time the user wants to login with facebook.

babkouew avatar Nov 25 '19 22:11 babkouew

I am also getting the same issue, have anyone got any solution for that. I have used version 5.5.1 and 5.12.0 and getting the same issue.

I switched to version 5.0.3 until it is fixed

ranjandas503 avatar Dec 06 '19 12:12 ranjandas503

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 05 '20 13:03 stale[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

stale[bot] avatar Mar 12 '20 14:03 stale[bot]

If someone is still facing issue then there is a solution which worked for me.

   if (AccessToken.getCurrentAccessToken() != null) {
            GraphRequest(
                AccessToken.getCurrentAccessToken(), "/me/permissions/", null, HttpMethod.DELETE,
                GraphRequest.Callback {
                    AccessToken.setCurrentAccessToken(null)
                    LoginManager.getInstance().logOut()
                }
            ).executeAsync()
        }

shahzadafridi avatar Sep 12 '20 23:09 shahzadafridi