Giter Site home page Giter Site logo

Comments (10)

bradymiller avatar bradymiller commented on July 30, 2024

Placed a fix for this here:
#278

What is happening was the repeating background_services ajax call was killing the session via timeout in auth.inc, but since the javascript in auth.inc never made it to the browser, the auto-logout was not done. To fix this, set it so these repeating calls can not cause the logout to happen.

This may not be an ideal solution.

from openemr.

bradymiller avatar bradymiller commented on July 30, 2024

Perhaps skipping it whenever an ajax call is done would be more ideal?
http://stackoverflow.com/questions/19794859/detect-ajax-in-php

from openemr.

sunsetsystems avatar sunsetsystems commented on July 30, 2024

I have used a GET parameter "running_as_ajax=1" in the fee sheet logic to detect that case. No idea how fragile or browser-dependent this other method would be. Anyway if your commit works I'm happy.

from openemr.

bradymiller avatar bradymiller commented on July 30, 2024

Note it does not do an auto logout, however (if try to do something after the timeout, it will logout). I think to get the auto logout really working will require a simple hidden iframe based on interface/main/daemon_frame.php script (interface/main/tabs/daemon_frame_tabs.php) that simply just keeps refreshing every 60 seconds or so. Thus on a timeout, it will then do a auto-logout without any user input.

from openemr.

bradymiller avatar bradymiller commented on July 30, 2024

If got above working, then would likely migrate the background services check and the future messages check to that script.

from openemr.

sunsetsystems avatar sunsetsystems commented on July 30, 2024

That makes sense to me. I guess an ajax success handler could do that too? I would look at how the browser reacts in each case... i.e. it's best if the browser does not show a "busy indicator" when these events happen.

from openemr.

bradymiller avatar bradymiller commented on July 30, 2024

Just committed the above fix to fix the site id is missing bug when the user tries to do something after a timeout; it will now instead logout.

Will now work on the fix to support auto-logout without any user insteraction.

from openemr.

bradymiller avatar bradymiller commented on July 30, 2024

@sunsetsystems ,

Placed a PR for this:
#285

It is working, but notably the browser does show a very brief "busy indicator" when this script is reloaded. Not sure how to avoid this while also ensuring the auth.inc javascript is rendered correctly.

from openemr.

sunsetsystems avatar sunsetsystems commented on July 30, 2024

Awesome, thanks!

from openemr.

bradymiller avatar bradymiller commented on July 30, 2024

Committed above PR.

from openemr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.