File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
config/clusters/earthscope Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -87,12 +87,15 @@ basehub:
87
87
return False
88
88
89
89
def populate_token(spawner, auth_state):
90
- token_env = {
91
- 'AUTH0_ACCESS_TOKEN': auth_state.get("access_token", ""),
92
- 'AUTH0_ID_TOKEN': auth_state.get("id_token", ""),
93
- 'AUTH0_REFRESH_TOKEN': auth_state.get('refresh_token', '')
94
- }
95
- spawner.environment.update(token_env)
90
+ # For our deployment-service-check health check user, there is no auth_state.
91
+ # So these env variables need not be set.
92
+ if auth_state:
93
+ token_env = {
94
+ 'AUTH0_ACCESS_TOKEN': auth_state.get("access_token", ""),
95
+ 'AUTH0_ID_TOKEN': auth_state.get("id_token", ""),
96
+ 'AUTH0_REFRESH_TOKEN': auth_state.get('refresh_token', '')
97
+ }
98
+ spawner.environment.update(token_env)
96
99
97
100
c.Spawner.auth_state_hook = populate_token
98
101
You can’t perform that action at this time.
0 commit comments