Browse Source

Fix OTB Cloud handoff to use portal_client_id and portal_email

main
def 3 weeks ago
parent
commit
c166046031
  1. 15
      backend/routes/portal_services.py

15
backend/routes/portal_services.py

@ -106,17 +106,12 @@ def portal_launch_otb_cloud():
flash("Please sign in to access services.", "warning") flash("Please sign in to access services.", "warning")
return redirect(url_for("portal_login")) return redirect(url_for("portal_login"))
uid = ( uid = session.get("portal_client_id")
session.get("portal_user_id") email = session.get("portal_email")
or session.get("client_id")
or session.get("user_id")
)
email = ( if not uid or not email:
session.get("portal_email") flash("Unable to launch OTB Cloud because the portal session is missing required account details.", "danger")
or session.get("email") return redirect(url_for("portal_services.portal_services_home"))
or "unknown@example.com"
)
url = build_otb_cloud_handoff_url(uid, email) url = build_otb_cloud_handoff_url(uid, email)
return redirect(url) return redirect(url)

Loading…
Cancel
Save