From 27b28e54e3b38585fa52b6756eb9255b7167e58d Mon Sep 17 00:00:00 2001 From: "Stephen C. Pope" Date: Mon, 18 Mar 2024 10:22:45 -0700 Subject: [PATCH] [Core-317] Fix oauth2 refresh token flow (#12494) GitOrigin-RevId: 095cdeb2b1f7afd858cf2f544a6ad82e673a80bf --- descarteslabs/auth/auth.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/descarteslabs/auth/auth.py b/descarteslabs/auth/auth.py index a1549304..32ed1669 100644 --- a/descarteslabs/auth/auth.py +++ b/descarteslabs/auth/auth.py @@ -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(): @@ -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: