diff --git a/frontend/src/app/main/data/auth.cljs b/frontend/src/app/main/data/auth.cljs index 53d9f6ff061..1a8fe6b843a 100644 --- a/frontend/src/app/main/data/auth.cljs +++ b/frontend/src/app/main/data/auth.cljs @@ -259,11 +259,12 @@ ptk/WatchEvent (watch [_ state _] (let [profile-id (:profile-id state) - ;; Rewrite "foss-." → "foss." so we land on the portal - ;; (outside ForwardAuth) instead of Penpot's own root, which would silently re-auth. + ;; Rewrite "-." → "." so we land on + ;; the portal (outside ForwardAuth) instead of Penpot's own root, which would + ;; silently re-auth. host (.-host js/location) protocol (.-protocol js/location) - portal-host (.replace host #"^[^.]*\." "moneta.") + portal-host (.replace host #"^([^-]+)-[^.]+\.(.+)" "$1.$2") portal-uri (str protocol "//" portal-host) logged-out-ev (logged-out {:redirect-uri portal-uri})] (->> (rx/interval 500)