Skip to content

Commit

Permalink
auth_flag [deploy]
Browse files Browse the repository at this point in the history
  • Loading branch information
jayeshhireox committed Feb 13, 2025
1 parent 34c3db3 commit 81d4a42
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/mdvtools/auth/auth0_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _initialize_oauth(self):
# Parse and check the existence of jwks_uri in the metadata
metadata = response.json()
print("@@@@@@")
print(metadata)
#print(metadata)
jwks_uri = metadata.get('jwks_uri')
if not jwks_uri:
logging.error(f"The OpenID configuration is missing 'jwks_uri': {metadata}")
Expand Down Expand Up @@ -80,7 +80,8 @@ def login(self) -> str:
redirect_uri = self.app.config["AUTH0_CALLBACK_URL"]
print(redirect_uri)
print(self.oauth.auth0.authorize_redirect(redirect_uri))
return self.oauth.auth0.authorize_redirect(redirect_uri)
return self.oauth.auth0.authorize_redirect(redirect_uri=redirect_uri)

except Exception as e:
logging.error(f"Error during login process: {e}")
raise RuntimeError("Login failed.") from e
Expand Down Expand Up @@ -125,7 +126,7 @@ def get_token(self) -> Optional[str]:
"""
try:
logging.info("Retrieving token from session.")
return session.get('token')
return session.get('token', {}).get('access_token')
except Exception as e:
logging.error(f"Error while retrieving token: {e}")
return None
Expand Down

0 comments on commit 81d4a42

Please sign in to comment.