Forums

Flask app has buggy login logic

On my local machine the app works fine and the flask_login module operates correctly with no bugs. However, after I host my app on a pythonanywhere server I'm noticing that the app switches the current user from logged in to logged out quite frequently after a user logs in. This creates a poor user experience and sends them back to the login page when they attempt to access features of the website that are only accessible to logged in users, but they are logged in so it shouldn't be an issue. Then if they keep spamming the button it will let them access it and somehow remembers that they were logged in. Any advice on how to solve this issue would be much appreciated!

Yeah that sounds weird. So it is working but intermittently.. Have you tried other browsers? Might it be a browser extension that's messing with the requests