Session persistence / cookies

Kevin B Posted in Component Development 3 years ago

Have a strange issue with my WebChat component which makes me think it could be a session persistence thing?

If I log on to chrome on my PC with the admin account, and then logon to the mobile app with a different account, I get a "too many redirects" error.

If I clear the browser cache, visit the website on the mobile browser, and log back in... The mobile app then seems to work perfectly.

You can see this on demo site

It feels as though the PWA is not logged on, so is being redirected to login, but Google's cached session says I am logged on so redirects it back to the WebChat creating an infinite loop.

Does this sound feasible?

Is there a way to tie the cookies/session to the host (my mobile and pc will present as the same source IP through the same router) or is it more likely an issue with my component?

Replies
gb Kevin B Replied 3 years ago

Not me 😜 lol. I love a challenge. I've installed termux on my android and using cUrl to see what's happening on the phone. I'll keep going until I fix it.

Indonesian Arsalan Shah Replied 3 years ago

I am not expert in PWA never worked on it in my life. I think the problem here app is keeping sending to one page then that page again sending to same page putting them in redirect loop.

gb Kevin B Replied 3 years ago

Seems to be related to the manifest file.

If I try to use the PWA without being logged in, I get the redirect loop. Also prevents me using the website.

If I clear the cache, login through the browser... The PWA then works fine.

Anyone with experience of manifest files that might be able to throw some pointers my way?

It's also possible my complicated setup is causing issues. My root site at kjbtech.co.uk redirects to kjbtech.co.uk/wp. There's an exclusion to anything with OSSN in the path where it doesn't redirect. Then ossn itself seems to want to work from / but it's running from /ossn ... Perhaps that's causing issues?

Premium Version

Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.

$199 (Life Time)
Learn More

Other Questions