File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,16 @@ def per_user_profiles(spawner):
169
169
# Try to validate session / refresh token every 10 minutes
170
170
c .Authenticator .auth_refresh_age = 600
171
171
172
+ # Needed to save refresh token
173
+ c .Authenticator .enable_auth_state = True
174
+
175
+ if 'JUPYTERHUB_CRYPT_KEY' not in os .environ :
176
+ app_log .warn (
177
+ "Need JUPYTERHUB_CRYPT_KEY env for persistent auth_state.\n "
178
+ " export JUPYTERHUB_CRYPT_KEY=$(openssl rand -hex 32)"
179
+ )
180
+ c .CryptKeeper .keys = [ os .urandom (32 ) ]
181
+
172
182
"""
173
183
EXTRAS
174
184
"""
Original file line number Diff line number Diff line change @@ -110,4 +110,3 @@ def _get_token(url: str) -> str:
110
110
app_log .error ("url:\n %s" , url )
111
111
raise HTTPError (500 , f"url: { url } " )
112
112
return parts [1 ]
113
-
You can’t perform that action at this time.
0 commit comments