Skip to content

Commit f6e9b23

Browse files
Annybell VillarroelAnnybell Villarroel
authored andcommitted
auth0_domain
1 parent ac18482 commit f6e9b23

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

00-Starter-Seed/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.env
1+
.env
2+
.pyc

00-Starter-Seed/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def static_files(filename):
5454
def callback_handling():
5555
code = request.args.get(constants.CODE_KEY)
5656
json_header = {constants.CONTENT_TYPE_KEY: constants.APP_JSON_KEY}
57-
token_url = 'https://{domain_auth0}/oauth/token'.format(domain_auth0=env[constants.AUTH0_DOMAIN])
57+
token_url = 'https://{auth0_domain}/oauth/token'.format(auth0_domain=env[constants.AUTH0_DOMAIN])
5858
token_payload = {
5959
constants.CLIENT_ID_KEY : env[constants.AUTH0_CLIENT_ID],
6060
constants.CLIENT_SECRET_KEY : env[constants.AUTH0_CLIENT_SECRET],
@@ -65,8 +65,8 @@ def callback_handling():
6565

6666
token_info = requests.post(token_url, data=json.dumps(token_payload),
6767
headers=json_header).json()
68-
user_url = 'https://{domain_auth0}/userinfo?access_token={access_token}'.format(
69-
domain_auth0=env[constants.AUTH0_DOMAIN], access_token=token_info[constants.ACCESS_TOKEN_KEY])
68+
user_url = 'https://{auth0_domain}/userinfo?access_token={access_token}'.format(
69+
auth0_domain=env[constants.AUTH0_DOMAIN], access_token=token_info[constants.ACCESS_TOKEN_KEY])
7070
user_info = requests.get(user_url).json()
7171
session[constants.PROFILE_KEY] = user_info
7272
return redirect('/dashboard')

0 commit comments

Comments
 (0)