Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to disable the oauth confirmation screen #458

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion jhub_apps/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ def set_defaults_for_jhub_apps_config(c):
setattr(c.JAppsConfig, trait_name, defaults.get(trait_name))


def install_jhub_apps(c, spawner_to_subclass):
def install_jhub_apps(c, spawner_to_subclass, *, oauth_no_confirm=False):
"""Install jhub-apps into JupyterHub configuration object (`c`).

When `oauth_no_confirm` is set to True, the "Authorize access"
screen is not shown and jhub-apps is always granted access to
read the identity of the visiting JupyterHub user.
"""
c.JupyterHub.spawner_class = subclass_spawner(spawner_to_subclass)
c.JupyterHub.allow_named_servers = True
bind_url = c.JupyterHub.bind_url
Expand Down Expand Up @@ -69,6 +75,7 @@ def install_jhub_apps(c, spawner_to_subclass):
"HUB_SERVICE_PORT": "*",
},
"oauth_redirect_uri": oauth_redirect_uri,
"oauth_no_confirm": oauth_no_confirm,
"display": False,
},
]
Expand Down
Loading