gpt4 book ai didi

android - 如何在 chrome 自定义选项卡 android 中共享 cookie 数据

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:42:23 25 4
gpt4 key购买 nike

我们有一个 android 应用程序,我们想在其中打开一个 url。为了避免用户重新输入用户名和密码,我们想传递 session cookie。我们可以在我们的应用程序中使用 webview 来执行此操作,但我们希望避免使用 webview。

我们找到的另一个解决方案是使用 chrome 自定义选项卡。根据文档 https://developer.chrome.com/multidevice/android/customtabs chrome 自定义标签支持:

Shared Cookie Jar and permissions model so users don't have to log in to sites they are already connected to, or re-grant permissions they have already granted.

我正在尝试来自 https://github.com/GoogleChrome/custom-tabs-client 的示例但我无法弄清楚如何传递 session 数据。

任何人都可以通过指向文档或实现此目标的方法来帮助我吗?

最佳答案

Shared cookie jar 是指 Custom Tab 与 Chrome 共享 cookie jar。从今天开始,无法从自定义选项卡内的应用程序设置 cookie。

另一方面,您可能需要检查 Smart Lock for Passwords ,它支持跨应用程序和网站自动登录(并将在自定义选项卡内工作)

关于android - 如何在 chrome 自定义选项卡 android 中共享 cookie 数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32268158/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com