There was an error while loading. Please reload this page.
1 parent 398329c commit 46b19b1Copy full SHA for 46b19b1
01-Login/server.py
@@ -56,7 +56,7 @@ def handle_auth_error(ex):
56
consumer_secret=AUTH0_CLIENT_SECRET,
57
request_token_params={
58
'scope': 'openid profile',
59
- 'audience': AUTH0_AUDIENCE
+ 'audience': 'https://' + AUTH0_DOMAIN + '/userinfo'
60
},
61
base_url='https://%s' % AUTH0_DOMAIN,
62
access_token_method='POST',
@@ -104,11 +104,9 @@ def callback_handling():
104
105
return redirect('/dashboard')
106
107
-
108
@APP.route('/login')
109
def login():
110
- return auth0.authorize(callback=AUTH0_CALLBACK_URL)
111
+ return auth0.authorize(callback=AUTH0_CALLBACK_URL if AUTH0_CALLBACK_URL is not '' else "http://localhost:3000/callback")
112
113
@APP.route('/logout')
114
def logout():
0 commit comments