Unverified Commit 978c0b6c authored by Khanh Ngo's avatar Khanh Ngo Committed by GitHub
Browse files

Merge pull request #711 from terbolous/azure_oauth

Azure oauth fixes
parents 5bd8990a b03cbdea
......@@ -201,7 +201,7 @@ def login():
return redirect(url_for('index.index'))
if 'azure_token' in session:
azure_info = azure.get('me?$select=displayName,givenName,id,mail,surname,userPrincipalName,preferredName').text
azure_info = azure.get('me?$select=displayName,givenName,id,mail,surname,userPrincipalName').text
current_app.logger.info('Azure login returned: '+azure_info)
me = json.loads(azure_info)
......@@ -218,8 +218,8 @@ def login():
azure_username = me["userPrincipalName"]
azure_givenname = me["givenName"]
azure_familyname = me["surname"]
if "email" in me:
azure_email = me["email"]
if "mail" in me:
azure_email = me["mail"]
else:
azure_email = ""
if not azure_email:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment