Opening Limesurvey from a User Portal on mobile logs the user out

More
3 months 2 weeks ago #156689 by beth193
beth193 created the topic: Opening Limesurvey from a User Portal on mobile logs the user out
Hi, I'm not sure if this is the right place to post this sorry, but I have a user portal where users will log in and see a list of all the surveys they have to complete for a certain program, they can then click on each survey and it will open in a new tab and they can complete it. This all works fine on PC (and mac), they get the standard token mismatch if they have multiple tokens in the same survey but I'm happy to warn them about that. However, as soon as they click a survey link on mobile they get kicked out of the user portal and have to log back in again. This only happens when limesurvey and the portal are on the same domain (example.com/portal and example.com/survey), so I'm guessing it has something to do with sessions but I do wonder why it doesn't happen on desktop computers? Is there something different that Limesurvey does with sessions for mobile only, like does it wipe all session variables on opening a new survey? I'm currently going to have to use subdomains for the portal and the main domain for the survey, which seems to fix it, but that's really not preferable as the clients wanted to use a single clear domain for all purposes. Thanks so much for any help and any suggesstions!

Please Log in to join the conversation.

More
3 months 2 weeks ago #156693 by jelo
jelo replied the topic: Opening Limesurvey from a User Portal on mobile logs the user out
Mobile vs. PC on the first sight. But you use browsers on every platform and they might behave differently with different settings.

I experienced this kind of issue with LimeSurvey when using more than one installation of LimeSurvey.
When using a subdomain you always have separate cookie sessions, but with a sub-directory there is only cookie session in LimeSurvey. To me it looks like the "portal" and LimeSurvey are using the same cookiename, which is overwritten in the browser. Perhaps the portal-application is using the Yii framework too. Difficult to diagnose without watching sessions/cookies in a browser while logging in. But the subdomain vs. subdirectory behavior is a strong indication that changing the name of a cookie/session name might be the solution.

manual.limesurvey.org/Optional_settings#Session_settings

Depending on how the session files are stored it is possible that the sessions files are overwritten on the serverside. If the user portal is using PHP as well, it might help to check where the session files are saved and ensure that different locations are used to prevent overwriting of session files.
The following user(s) said Thank You: beth193

Please Log in to join the conversation.

More
3 months 2 weeks ago #156694 by beth193
beth193 replied the topic: Opening Limesurvey from a User Portal on mobile logs the user out
Thank you so much! That did it - I changed the session name before starting the session each time in the user portal (it is written in php but with no framework, just a very simple page where users can see all the surveys they're signed up for). It would have been using the default and I guess Limesurvey does too, so changing it fixed it up right away on mobile and users no longer get logged out when opening surveys in new tabs. I still think it's weird that it worked on any desktop browser before, they must do something different with multiple pages using the same session even on the same domain. Thank you again!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now