I tried the following:
@socketio.on("signup req")
def signup_req(json):
print(f"Response! {json}")
socketio.emit("signup res", "RECEIVED!")
session["user"] = {"name": json["name"]}
but when I want to access it by doing:
@app.route('/')
def index():
...
print(session["user"])
...
I'll get a KeyError which means that the key didn't get stored inside the session.