V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
duanzs
V2EX  ›  HTML

H5 不同域名页面跳转如何携带 cookie

  •  
  •   duanzs · Dec 22, 2020 · 3425 views
    This topic created in 1964 days ago, the information mentioned may be changed or developed.

    我们有好几个不同的 h5 系统,不同 url,甚至根域名都不一样 但是要公用一个入口,登陆后会把 cookie 种在加载的首页域名 现在想法是,弄个类似于路由器首页,如 xxx.com/index.html,登陆后,cookie 种在 xxx.com 域名下,然后根据 cookie 信息查询后,跳转到 aaa.com/index.html bbb.com/index.html ccc.com/index.html 所以,跳转的时候怎么携带 cookie

    2 replies    2020-12-22 15:49:14 +08:00
    shakaraka
        1
    shakaraka  
    PRO
       Dec 22, 2020
    oauth 了解下
    eason1874
        2
    eason1874  
       Dec 22, 2020
    常规做法是通过 URL QUERY 传参,你可以留意巨硬在 office 和 outlook 的登录跳转,那 access_token 字符长度近 2000,用 . 隔开了几段,啥都能带了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3008 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 13:19 · PVG 21:19 · LAX 06:19 · JFK 09:19
    ♥ Do have faith in what you're doing.