Is there a way to login a user using Flask Socket IO?
问题 I'm using Flask with Flask SocketIO and Flask Login . My issue is that when I tried to use the login_user function inside of a socketio.on event, there is no error, but the user isn't logged in. My example might help illustrate this. my example event will be called for the user to login, and then /usersonly will be for after that event is called. @socketio.on('my example event') def my_func(json): ... login_user(user) @app.route('/usersonly') @login.user_required def my_call(): print(current