Ricardo Amaral
Posts: 0
Joined: Thu Mar 17, 2016 7:33 pm

Clean up user FB credential ID data after logout with Facebook (ionic / angular)

My logout function works fine, but it doesn't clean up user data if they had logged with Facebook API before (Apperyio.User.loginFB).

After logout, next time user try to login with FB again, it doesn't prompt FB login request, it just login again. In other words, app still knowing user FB credentials ID after logout.

Seems the FB function create some DB record or Cookie that is not cleaned up after logout and I could not debug it

How to clean that on logout process?

Note there are some workaround for other platforms that I could not apply for Ionic.

Ricardo Amaral
Posts: 0
Joined: Thu Mar 17, 2016 7:33 pm

Clean up user FB credential ID data after logout with Facebook (ionic / angular)

Hi Sergiy, thank you for your feedback.

I have tried Apperyio.User.logoutOauth (this detach FB id from Appery,oi ID) and Apperyio.User.invalidate, and didn't had the expected behavior.

Seems after the first FB logon, the Apperyio.User.loginFB api create some cache (or cookie at internal browser?) and use that data next time. When I clean up the app data via Android settings, it request the FB login again on next logon. The problem is users having to do that technical processo to logout from FB at the app.

Note I'm not using autologin logic for this, just pushing the FB login button manually calling Apperyio.User.loginFB api.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Clean up user FB credential ID data after logout with Facebook (ionic / angular)

Please use Apperyio.User.invalidate(); instead of Apperyio.User.logoutOauth();
I'll remove all user's data from the device.

If you want to remove all facebook cache from the app, please change the line 399 from the file:
WEB_RESOURCES/libs/apperyio/slogin.js
from: preref = window.open( url, 'blank', 'location=yes' );/pre
to: preref = window.open( url, 'blank', 'location=yes,clearcache=yes,clearsessioncache=yes' );/pre

Return to “Issues”