fffiloni commited on
Commit
58c3f9f
·
verified ·
1 Parent(s): 971b09b

Upload 4 files

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +5 -4
README.md CHANGED
@@ -133,4 +133,4 @@ See `CHANGELOG_V194.md` for the Model Pre-scan Decision Card UI pass.
133
  See `CHANGELOG_V195.md` for the Runtime CSS Cleanup with Legacy Safety Net pass.
134
 
135
 
136
- Current release: Agentic Space Factory v198.23.
 
133
  See `CHANGELOG_V195.md` for the Runtime CSS Cleanup with Legacy Safety Net pass.
134
 
135
 
136
+ Current release: Agentic Space Factory v198.23.1.
app.py CHANGED
@@ -89,6 +89,7 @@ def _oauth_context_from_request(request: Request) -> dict[str, Any]:
89
  "scopes": sorted(ctx.scopes),
90
  "missing_scopes": ctx.missing_scopes,
91
  "expires_at": ctx.expires_at.isoformat() if ctx.expires_at else None,
 
92
  "is_pro": ctx.is_pro,
93
  "can_pay": ctx.can_pay,
94
  "warnings": oauth_warning_messages(ctx),
@@ -429,8 +430,8 @@ def register_custom_routes(fastapi_app: FastAPI) -> None:
429
  "workflows": ["build_from_model_card", "validate_existing_space", "runs_explorer"],
430
  "custom_ui_status": "root_custom_ui",
431
  "user": {"username": ctx["username"], "missing_scopes": ctx.get("missing_scopes", []), "warnings": ctx.get("warnings", []), "auth_lifetime": ctx.get("auth_lifetime")} if ctx else None,
432
- "login_url": "/oauth/huggingface/login",
433
- "logout_url": "/oauth/huggingface/logout",
434
  "anonymous_eval": public_eval_config(ctx["username"] if ctx else None),
435
  }
436
  )
@@ -454,8 +455,8 @@ def register_custom_routes(fastapi_app: FastAPI) -> None:
454
  "auth_lifetime": ctx.get("auth_lifetime"),
455
  "anonymous_eval": public_eval_config(ctx["username"] if ctx else None),
456
  "expires_at": ctx.get("expires_at"),
457
- "login_url": "/oauth/huggingface/login",
458
- "logout_url": "/oauth/huggingface/logout",
459
  }
460
  )
461
 
 
89
  "scopes": sorted(ctx.scopes),
90
  "missing_scopes": ctx.missing_scopes,
91
  "expires_at": ctx.expires_at.isoformat() if ctx.expires_at else None,
92
+ "auth_lifetime": oauth_lifetime_summary(ctx),
93
  "is_pro": ctx.is_pro,
94
  "can_pay": ctx.can_pay,
95
  "warnings": oauth_warning_messages(ctx),
 
430
  "workflows": ["build_from_model_card", "validate_existing_space", "runs_explorer"],
431
  "custom_ui_status": "root_custom_ui",
432
  "user": {"username": ctx["username"], "missing_scopes": ctx.get("missing_scopes", []), "warnings": ctx.get("warnings", []), "auth_lifetime": ctx.get("auth_lifetime")} if ctx else None,
433
+ "login_url": "/oauth/huggingface/login?_target_url=/",
434
+ "logout_url": "/oauth/huggingface/logout?_target_url=/",
435
  "anonymous_eval": public_eval_config(ctx["username"] if ctx else None),
436
  }
437
  )
 
455
  "auth_lifetime": ctx.get("auth_lifetime"),
456
  "anonymous_eval": public_eval_config(ctx["username"] if ctx else None),
457
  "expires_at": ctx.get("expires_at"),
458
+ "login_url": "/oauth/huggingface/login?_target_url=/",
459
+ "logout_url": "/oauth/huggingface/logout?_target_url=/",
460
  }
461
  )
462