Remove exception
This commit is contained in:
parent
c143d96fab
commit
74e039809d
|
@ -33,6 +33,7 @@ hub:
|
|||
async def refresh_user(self, user, handler=None):
|
||||
auth_state = await user.get_auth_state()
|
||||
if not auth_state:
|
||||
print(f'auth_state missing for {user}')
|
||||
return False
|
||||
access_token = auth_state['access_token']
|
||||
refresh_token = auth_state['refresh_token']
|
||||
|
@ -44,9 +45,6 @@ hub:
|
|||
return False
|
||||
print(f'Time is: {now}, token expires: {expires}')
|
||||
return True
|
||||
except KeyError:
|
||||
print(f'No auth_state available for user: {user.name}')
|
||||
return False
|
||||
|
||||
c.JupyterHub.authenticator_class = NextcloudOAuthenticator
|
||||
c.NextcloudOAuthenticator.client_id = os.environ['NEXTCLOUD_CLIENT_ID']
|
||||
|
|
Loading…
Reference in a new issue