是否可以让默认浏览器的 cookies 在 webview 中可用?我想使用 webview 进行身份验证,因为 webview 默认使用自己的 cookie 存储,我的用户必须再次输入他们的凭据,这是我真正想避免的事情。
[edit] 我忘记添加的内容:我使用 google 和 facebook 作为登录的 openid-providers,而且很可能用户已经使用该帐户登录。所以在网络浏览器中,他们不需要输入他们的凭据,但在 WebView 中他们是。我真的认为在 WebView 中询问 google 或 facebook 密码是不好的做法。
最佳答案
Is it possible to make the cookies of the default browser available in a webview?
不,对不起。
I want to use a webview for authentification and since the webview uses its own cookie store by default, my users would have to enter their credetials a second time, and that is something I really would like to avoid.
然后要么:
- 为整个体验使用
WebView
,或者 - 在整个体验中使用用户选择的浏览器,或者
- 使用 cookie 以外的东西进行 session 跟踪(例如,URL 中的
jsession
值)
关于android - 使浏览器 cookie 在 web View 中可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10674876/