Skip to content

Commit

Permalink
Update client.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aviv-ebates authored Mar 5, 2019
1 parent 45eb825 commit 3dd112b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions microsoft_auth/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, state=None, request=None, *args, **kwargs):
def authorization_url(self):
""" Generates Microsoft/Xbox or a Office 365 Authorization URL """
auth_url = self._authorization_url
tenant = self.config.get('MICROSOFT_AUTH_TENANT_ID', 'common')
tenant = self.config.MICROSOFT_AUTH_TENANT_ID
auth_url = auth_url.replace('TENANT', tenant)
if self.config.MICROSOFT_AUTH_LOGIN_TYPE == LOGIN_TYPE_XBL:
auth_url = self._xbox_authorization_url
Expand All @@ -73,7 +73,7 @@ def authorization_url(self):

def fetch_token(self, **kwargs):
""" Fetchs OAuth2 Token with given kwargs"""
tenant = self.config.get('MICROSOFT_AUTH_TENANT_ID', 'common')
tenant = self.config.MICROSOFT_AUTH_TENANT_ID
url = self._token_url.replace('TENANT', tenant)
return super().fetch_token(
self._token_url,
Expand Down

0 comments on commit 3dd112b

Please sign in to comment.