I have implemented a web server using python flask and hosted in pythonanywhere.com ... I have used global variables in my implementation for handle login sessions. for example-
TOKENS = {"OAUTH_TOKEN": ""}
if(TOKENS['OAUTH_TOKEN']) == "":
authorized = Flase
else:
authorized = True
But the problem is when a user logged and authorized the second user get as a authorized user. pythonanywhere used WSGI as a server for run python flask web application. How can I handle each user as separates threads?