File tree 1 file changed +24
-1
lines changed
config/clusters/jupyter-health
1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,28 @@ jupyterhub:
9
9
secretName : https-auto-tls
10
10
hub :
11
11
config :
12
- GitHubOAuthenticator :
12
+ JupyterHub :
13
+ authenticator_class : generic-oauth
14
+ GenericOAuthenticator :
15
+ client_id : Ima7rx8D6eko0PzlU1jK28WBUT2ZweZj7mqVG2wm
13
16
oauth_callback_url : https://staging.jupyter-health.2i2c.cloud/hub/oauth_callback
17
+ authorize_url : https://chcs.fly.dev/o/authorize/
18
+ token_url : https://chcs.fly.dev/o/token/
19
+ usredata_url : https://chcs.fly.dev/api/v1/users/profile
20
+ username_claim : email
21
+ login_service : CHCS
22
+ scope :
23
+ - openid
24
+ enable_auth_state : true
25
+ extraConfig :
26
+ # add access tokens via auth state
27
+ auth_state_env.py : |
28
+ def auth_state_env(spawner, auth_state):
29
+ if not auth_state:
30
+ spawner.log.warning(f"Missing auth state for user {spawner.user.name}")
31
+ return
32
+ spawner.environment["CHCS_TOKEN"] = auth_state["access_token"]
33
+ spawner.environment["CHCS_REFRESH_TOKEN"] = auth_state["refresh_token"]
34
+ spawner.environment["CHCS_CLIENT_ID"] = "Ima7rx8D6eko0PzlU1jK28WBUT2ZweZj7mqVG2wm"
35
+
36
+ c.Spawner.auth_state_hook = auth_state_env
You can’t perform that action at this time.
0 commit comments