diff --git a/jupyter/base/values/values.yaml b/jupyter/base/values/values.yaml index 8acd5b8..4161e94 100644 --- a/jupyter/base/values/values.yaml +++ b/jupyter/base/values/values.yaml @@ -17,6 +17,7 @@ hub: from oauthenticator.generic import GenericOAuthenticator def get_nextcloud_access_token(refresh_token): + debug = 'NEXTCLOUD_DEBUG_OAUTH' in os.environ client_id = os.environ['NEXTCLOUD_CLIENT_ID'] client_secret = os.environ['NEXTCLOUD_CLIENT_SECRET'] @@ -30,6 +31,8 @@ hub: 'client_secret': client_secret } response = requests.post(url, data=data) + if debug: + print(response.text) return response.json() def post_auth_hook(authenticator, handler, authentication): @@ -103,7 +106,7 @@ hub: c.NextcloudOAuthenticator.allow_all = True c.NextcloudOAuthenticator.refresh_pre_spawn = True c.NextcloudOAuthenticator.enable_auth_state = True - c.NextcloudOAuthenticator.auth_refresh_age = 3600 + c.NextcloudOAuthenticator.auth_refresh_age = 60 c.NextcloudOAuthenticator.post_auth_hook = post_auth_hook extraEnv: