Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. 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.

When I log from a non-iOS device I see...

1 - WAApplication>>handleFiltered: application URL

  • self requestContext redirectTo: 'https://login.microsoftonline.com/...'
  • redirects back to our app URL with an access token

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

  • validate token with Azure
  • save user info in new WASession
  • finish render

3 - WAApplication>>handleFiltered: application URL with _s & _k plus callback values like: &2=2160&1=3840&3=false

  • WAResponse>>location: application URL with _s & new _k and no callback values

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

  • finish render

With iOS step 3 does not happen; I'd like to know what triggers it normally.

Just to add to the fun, we have a two WAApplication registered. The default application fails on iOS, the other works fine. 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)

like image 230
Bob Nemec Avatar asked Oct 18 '25 11:10

Bob Nemec


1 Answers

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. Removing that href fixes the problem with iOS. Lots of other & cleaner ways to get the data. Quick fix is to wrap the href with a setTimeout for 200 ms.

like image 78
Bob Nemec Avatar answered Oct 21 '25 00:10

Bob Nemec



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!