Local Host Refused To Connect- Site Cannot Be Reached

I recently implemented the python SDK code onto my application, and everything appeared to be working, I successfully went through a registration process registered an email, and verified it. However, I took a break and came back(I did not change anything), and upon pressing my login button I got this error- ““GET /login HTTP/1.1” 302 -” and the browser page says “This site cannot be reached, localhost refused to connect”. I checked and my callback URL and everything seems to be correct. Any help would be much appreciated.

My login callback code is as follows-

def callback_handling():
resp = auth0.get(‘userinfo’)
userinfo = resp.json()

session[os.environ['JWT_PAYLOAD']] = userinfo
session[os.environ['PROFILE_KEY']] = {
    'user_id': userinfo['sub'],
    'name': userinfo['name'],
    'picture': userinfo['picture']
return redirect('/dash')

def login():
return auth0.authorize_redirect(redirect_uri=AUTH0_CALLBACK_URL)

  • Which SDK this is regarding: e.g. auth0-python flask
  • SDK Version: 2.29.0
    Python 3.8
  • Code Snippets/Error Messages/Supporting Details/Screenshots:

The ERR_CONNECTION_REFUSED insinuates that no one is listening at localhost:xxxx for HTTP connections. Could you verify that your application is running and you visited the correct url that you defined in your application?