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-
@app.route(‘/callback’)
def callback_handling():
auth0.authorize_access_token()
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')
@app.route(‘/login’)
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: