Skip to content

Commit

Permalink
[Core-317] Fix oauth2 refresh token flow (#12494)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 095cdeb2b1f7afd858cf2f544a6ad82e673a80bf
  • Loading branch information
stephencpope authored and Descartes Labs Build committed Mar 18, 2024
1 parent a8241a2 commit 27b28e5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions descarteslabs/auth/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,11 @@ def session(self):
return self._session.get()

def build_session(self):
return Session(self.domain, retries=self._retry_config)
session = Session(self.domain, retries=self._retry_config)
# local testing will not have necessary certs
if self.domain.startswith("https://dev.localhost"):
session.verify = False
return session

@staticmethod
def get_default_auth():
Expand Down Expand Up @@ -700,8 +704,6 @@ def _get_token(self, timeout=100):
if self.client_id in [
# production tenant
"ZOBAi4UROl5gKZIpxxlwOEfx8KpqXf2c",
# descarteslabs-dev tenant
"DK0fmkWyfgBaLzhvhhKXUeu3BkwROIkX",
]: # TODO(justin) remove legacy handling
# TODO (justin) insert deprecation warning
if self.scope is None:
Expand Down

0 comments on commit 27b28e5

Please sign in to comment.