diff --git a/jupyter/base/values/values.yaml b/jupyter/base/values/values.yaml index 64a1813..6dbb98a 100644 --- a/jupyter/base/values/values.yaml +++ b/jupyter/base/values/values.yaml @@ -13,10 +13,14 @@ hub: oauthCode: | import time from oauthenticator.generic import GenericOAuthenticator + def post_auth_hook(authenticator, handler, authentication): user = authentication['auth_state']['oauth_user']['ocs']['data']['id'] - authentication['auth_state']['token_expires'] = time.time() + auth_state['token_response']['expires_in'] + auth_state = authentication['auth_state'] + auth_state['token_expires'] = time.time() + auth_state['token_response']['expires_in'] + authentication['auth_state'] = auth_state return authentication + class NextcloudOAuthenticator(GenericOAuthenticator): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs)