Skip to content

Commit

Permalink
fix(auth/oidc): handle auth tries with wrong credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
alambare committed May 3, 2024
1 parent 324e482 commit cd4fa02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eodag/plugins/authentication/openid_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ def authenticate(self) -> AuthBase:
state = self.compute_state()
authentication_response = self.authenticate_user(state)
exchange_url = authentication_response.url
if not exchange_url.startswith(self.config.redirect_uri):
raise AuthenticationError(
f"Could not authenticate user with provider {self.provider}.",
"Please verify your credentials",
)
if self.config.user_consent_needed:
user_consent_response = self.grant_user_consent(authentication_response)
exchange_url = user_consent_response.url
Expand Down

0 comments on commit cd4fa02

Please sign in to comment.