简体   繁体   中英

Is there a way to prevent username caching in the SDK login?

I'm building an app that is going to be used as a kiosk, with multitudes of people using the same device to log into facebook. I'm clearing the web browser cache which prevents the users from being auto saved and logged in, but the part that I'm unable to figure out is how to keep it from offering username hints in the username box, for users that have logged in via the app. Is there some way to keep it from memorizing usernames and/or displaying the hint in the username input?

TIA

Yep, had much of the same problem myself!

In FbDialog of the facebook sdk(or your implementation):

protected void setUpWebView(int margin) {
    ...

    mWebView.getSettings().setSavePassword(false);
    mWebView.getSettings().setSaveFormData(false);

    ...
}

You should probably already have the .setSavePassword(false) part if your using the latest sdk. (If not, you should definitely add it, there was a big security flaw in fb dialogs)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM