Page 1 of 1

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

Posted: Thu May 05, 2016 2:46 am
by Ricardo Amaral

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.


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

Posted: Thu May 05, 2016 4:50 pm
by Serhii Kulibaba

Hello Ricardo,

Please change JS of the autologing here: https://devcenter.appery.io/documenta...


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

Posted: Fri May 06, 2016 2:14 am
by Ricardo Amaral

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.


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

Posted: Wed May 11, 2016 10:06 am
by Serhii Kulibaba

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