File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 2
2
from urllib .parse import urlunparse
3
3
from urllib .parse import quote
4
4
5
+ import json
5
6
import requests
6
7
from flask import Blueprint , make_response , redirect , request
7
8
@@ -163,9 +164,12 @@ def public_github_oauth():
163
164
headers = github_api_headers ,
164
165
).json ()
165
166
167
+ # Display user info
168
+ logger .info (f'github_user_info = { json .dumps (github_user_info , indent = 2 )} ' )
169
+
170
+ # Get minimal information for setting username
166
171
github_username = github_user_info ["login" ].strip ()
167
172
name = github_user_info ['name' ].strip ()
168
- email = github_user_info ['email' ].strip ()
169
173
170
174
# If user exists
171
175
if current_user is not None :
@@ -182,6 +186,9 @@ def public_github_oauth():
182
186
# If user didn't already exist, we need to create one
183
187
if user is None :
184
188
189
+ # Grab email to use as netid
190
+ email = github_user_info ['email' ].strip ()
191
+
185
192
# Create user
186
193
user = User (
187
194
netid = email ,
You can’t perform that action at this time.
0 commit comments