mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-14 13:33:00 +00:00
fix trailing -
in oauth-client-id for single-user servers with empty server_name
This commit is contained in:
@@ -245,7 +245,10 @@ class User(HasTraits):
|
||||
# create API and OAuth tokens
|
||||
spawner.api_token = api_token
|
||||
spawner.admin_access = self.settings.get('admin_access', False)
|
||||
spawner.oauth_client_id = client_id = 'user-%s-%s' % (self.escaped_name, server_name)
|
||||
client_id = 'user-%s' % self.escaped_name
|
||||
if server_name:
|
||||
client_id = '%s-%s' % (client_id, server_name)
|
||||
spawner.oauth_client_id = client_id
|
||||
oauth_provider = self.settings.get('oauth_provider')
|
||||
if oauth_provider:
|
||||
client_store = oauth_provider.client_authenticator.client_store
|
||||
|
Reference in New Issue
Block a user