UIWebView不会存储用户名和密码

发布于 2024-11-25 05:06:33 字数 240 浏览 2 评论 0原文

我有一个应用程序,用户被重定向到 webview 以使用 oauth(twitter、google、facebook 等)登录。问题是,在使用 uiwebview 时,用户每次都必须输入用户名/密码。这变得非常烦人。有没有办法在字段中保存用户名/密码?

我不想将信息存储在 nsuserdefaults 中,因为我被告知它不安全。 uiwebview 是否可以访问钥匙串?如果是这样,我如何让 uiwebview 从钥匙串获取用户名/密码并进入字段?

I have an app where the user is redirected to a webview to sign in using oauth(twitter,google,facebook,etc). The problem is that while using a uiwebview, the user must enter the username/password EVERY time. This gets very annoying. Is there a way to save the username/password in the fields?

I don't want to store the info in nsuserdefaults because I am told it is not secure. Does the uiwebview have access to the keychain? and if so how do I get the uiwebview to get the username/password from the keychain and into the fields?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

血之狂魔 2024-12-02 05:06:33

查看本教程:

http://www .icodeblog.com/2010/09/16/dealing-with-the-twitter-oauth-apocalypse/

它使用 SA_OAuthTwitter 引擎,并将身份验证数据存储在 NSUserDefaults 中。
我自己没有使用过它,甚至没有在我的一个应用程序中实现 Twitter,我认为这就是可行的方法。

我真的认为你必须存储用户的身份验证数据,并在向 Twitter 发出请求时使用这些数据。

Check out this tutorial:

http://www.icodeblog.com/2010/09/16/dealing-with-the-twitter-oauth-apocalypse/

It's using the SA_OAuthTwitter Engine, and storing the auth-data in NSUserDefaults.
Without having used it myself, or even implemented Twitter in one of my applications, i think this is the way to go.

I really think you have to store the auth-data for the user, and use those data when making requests to Twitter.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文