It looks like you are sending the request to '/user-login' not /login, I also think that you have to put the full flask server url in the fetch for it to work : 'https://localhost:{flask_port}/login'