UIWebView不会存储用户名和密码
我有一个应用程序,用户被重定向到 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看本教程:
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.