Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safari loginStatus === "undefined" 死循环 #210

Closed
addlistener opened this issue Apr 28, 2023 · 7 comments
Closed

safari loginStatus === "undefined" 死循环 #210

addlistener opened this issue Apr 28, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@addlistener
Copy link

@authing/guard-react18 5.1.7

Chrome 没有问题
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36'

Edge 没有问题
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.58'

但 safari 不行
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Safari/605.1.15"

复现代码基本和样例一致
image

日志
image

localStorage 这里没有 _authing_user & _authing_token
image

@addlistener addlistener added the bug Something isn't working label Apr 28, 2023
@zhaoyiming0803
Copy link
Contributor

zhaoyiming0803 commented Apr 28, 2023

Safari 默认开启了禁止跨站脚本跟踪,导致无法传输 cookie,所以获取不到用户信息。具体解决方案我们已经排期,详细参考:

https://forum.authing.cn/t/topic/1145/7

https://forum.authing.cn/t/topic/1082/5

@addlistener
Copy link
Author

addlistener commented May 10, 2023

@zhaoyiming0803 这个是不是也会影响 iOS 上的所有浏览器?

有没有临时workaround的办法?

nuysoft/Mock#402 (comment) 我看这个的意思是,让我 monkey patch XMLHttpRequest? 有没有你们已经 work 的脚本可以参考一下?

或者,有没有 canary 版本的我能先顶一下。。毕竟要用户去改浏览器设置也不太现实

@zhaoyiming0803
Copy link
Contributor

@zhaoyiming0803 这个是不是也会影响 iOS 上的所有浏览器?

有没有临时workaround的办法?

nuysoft/Mock#402 (comment) 我看这个的意思是,让我 monkey patch XMLHttpRequest? 有没有你们已经 work 的脚本可以参考一下?

或者,有没有 canary 版本的我能先顶一下。。毕竟要用户去改浏览器设置也不太现实

有些项目中使用了 Mockjs,在生产环境可以先根据修改配置解决:nuysoft/Mock#402 (comment)

Safari 和 Firefox 默认开启『阻止跨站跟踪』,这个确实无法绕过。

Guard 只有『托管跳转模式』会受 cookie 影响,『内嵌模式』不受影响。

@zhaoyiming0803
Copy link
Contributor

@zhaoyiming0803 这个是不是也会影响 iOS 上的所有浏览器?

有没有临时workaround的办法?

nuysoft/Mock#402 (comment) 我看这个的意思是,让我 monkey patch XMLHttpRequest? 有没有你们已经 work 的脚本可以参考一下?

或者,有没有 canary 版本的我能先顶一下。。毕竟要用户去改浏览器设置也不太现实

有些项目中使用了 Mockjs,在生产环境可以先根据修改配置解决:nuysoft/Mock#402 (comment)

Safari 和 Firefox 默认开启『阻止跨站跟踪』,这个确实无法绕过。

Guard 只有『托管跳转模式』会受 cookie 影响,『内嵌模式』不受影响。https://docs.authing.cn/v2/reference/guard/v2/web.html#%E4%BD%BF%E7%94%A8%E5%86%85%E5%B5%8C%E6%A8%A1%E5%BC%8F

@addlistener
Copy link
Author

好的,谢谢! @zhaoyiming0803

  1. 这个bug修复的时间,canary 版本大概是什么时候呢?

  2. 用 mockjs 的代码,你们这里有吗?如果有的话我想直接用

主要是想评估我用哪种方式去 workaround

@zhaoyiming0803
Copy link
Contributor

zhaoyiming0803 commented May 15, 2023

@zhaoyiming0803
Copy link
Contributor

zhaoyiming0803 commented Jun 5, 2023

好的,谢谢! @zhaoyiming0803

  1. 这个bug修复的时间,canary 版本大概是什么时候呢?
  2. 用 mockjs 的代码,你们这里有吗?如果有的话我想直接用

主要是想评估我用哪种方式去 workaround

@addlistener @UncleBu1728 此问题已修复,可升级版本至:5.2.0,有其他异常 case 随时反馈。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants