简体   繁体   English

渲染的海边重定向在物理 iOS 设备上不起作用

[英]Seaside redirect for render not working on physical iOS devices

We're having a problem with physical iOS devices (works fine on Chrome virtual device) where a final Seaside redirect is not happening after an Azure SSO redirect.我们遇到了物理iOS设备(在 Chrome 虚拟设备上工作正常)的问题,在 Azure SSO 重定向之后没有发生最终的 Seaside 重定向。 I'd like to understand what triggers the Seaside redirect: I can see it in normal rendering, but I've never had to dig into it like this before.我想了解触发 Seaside 重定向的原因:我可以在正常渲染中看到它,但我以前从未像这样深入研究它。

When I log from a non-iOS device I see...当我从非 iOS 设备登录时,我看到...

1 - WAApplication>>handleFiltered: application URL 1 - WAApplication>>handleFiltered: application URL

  • self requestContext redirectTo: 'https://login.microsoftonline.com/...'
  • redirects back to our app URL with an access token使用访问令牌重定向回我们的应用程序 URL

2 - WAApplication>>handleFiltered: application URL with MS access token & no _s & _k values 2 - WAApplication>>handleFiltered: application URL with MS access token & no _s & _k values

  • validate token with Azure使用 Azure 验证令牌
  • save user info in new WASession在新的WASession中保存用户信息
  • finish render完成渲染

3 - WAApplication>>handleFiltered: application URL with _s & _k plus callback values like: &2=2160&1=3840&3=false 3 - WAApplication>>handleFiltered: application URL with _s & _k加上回调值,例如: &2=2160&1=3840&3=false

  • WAResponse>>location: application URL with _s & new _k and no callback values WAResponse>>location: application URL with _s & new _k且没有回调值

4 - WAApplication>>handleFiltered: application URL with _s & _K 4 - WAApplication>>handleFiltered: application URL with _s & _K

  • finish render完成渲染

With iOS step 3 does not happen;使用iOS不会发生第 3 步 I'd like to know what triggers it normally.我想知道正常情况下是什么触发的。

Just to add to the fun, we have a two WAApplication registered.只是为了增加乐趣,我们注册了两个WAApplication The default application fails on iOS , the other works fine.默认应用程序在iOS上失败,其他工作正常。 I can see no obvious difference between the two.我看不出两者之间有明显的区别。

Thanks for any help (I'll cross post on the the Seaside mailing list and Discord)感谢您的帮助(我将在 Seaside 邮件列表和 Discord 上交叉发布)

Problem is caused by a seven year old method that used a window.location.href= to gather device characteristics, like screen size and touch support.问题是由使用 window.location.href= 收集设备特征(如屏幕尺寸和触摸支持)的七年历史方法引起的。 Removing that href fixes the problem with iOS.删除该 href 解决了 iOS 的问题。 Lots of other & cleaner ways to get the data.许多其他更清洁的方法来获取数据。 Quick fix is to wrap the href with a setTimeout for 200 ms.快速解决方法是使用 setTimeout 将 href 包裹 200 毫秒。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM