Open instance in new tab as full page, not embed shell.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+13
-5
@@ -823,10 +823,18 @@ def register_hub_routes(app):
|
||||
token = (request.args.get("token") or "").strip()
|
||||
ok, next_path, err = verify_hub_sso_token(token, ex)
|
||||
if ok:
|
||||
dest_next = _embed_login_dest(next_path) if request.args.get(
|
||||
"embed", ""
|
||||
).strip().lower() in ("1", "true", "yes", "on") else next_path
|
||||
if _sso_wants_embed_auth() and request.is_secure:
|
||||
embed_on = request.args.get("embed", "").strip().lower() in (
|
||||
"1",
|
||||
"true",
|
||||
"yes",
|
||||
"on",
|
||||
)
|
||||
dest_next = _embed_login_dest(next_path) if embed_on else next_path
|
||||
if not embed_on:
|
||||
ht = (request.args.get("hub_theme") or "").strip().lower()
|
||||
if ht in ("light", "dark"):
|
||||
dest_next = _merge_query_into_path(next_path, hub_theme=ht)
|
||||
if embed_on and _sso_wants_embed_auth() and request.is_secure:
|
||||
boot = mint_hub_embed_bootstrap(ex, dest_next)
|
||||
if boot:
|
||||
from urllib.parse import urlencode as _ue
|
||||
@@ -838,7 +846,7 @@ def register_hub_routes(app):
|
||||
return redirect(f"/hub-embed-auth?{_ue(qdict)}")
|
||||
session["logged_in"] = True
|
||||
session.modified = True
|
||||
return redirect(_embed_login_dest(next_path))
|
||||
return redirect(dest_next)
|
||||
hint = err or "校验失败"
|
||||
flash(
|
||||
f"中控 SSO 未生效({hint})。"
|
||||
|
||||
Reference in New Issue
Block a user