Require login on app landing pages
Maintain Release Merge PR / update-release-pr (push) Canceled after 0s
Notify HeyPuter / notify (push) Canceled after 0s
release-please / release-please (push) Canceled after 0s

Prevent first-time visitors from being treated as temporary users when they open an app landing page such as `/app/<name>` or `/desktop/app/<name>`. These routes now always go through the real login/signup flow.
This commit is contained in:
Nariman Jelveh
2026-08-17 20:11:29 -07:00
parent f81b76c1d1
commit cabedc30b0
+4 -1
View File
@@ -2003,9 +2003,12 @@ window.initgui = async function (options) {
// -------------------------------------------------------------------------------------
// Un-authed but not first visit -> try to log in/sign up
// -------------------------------------------------------------------------------------
// App landing pages (`/app/<name>`, incl. `/desktop/app/<name>`) require a
// real account even on a first visit — never a temp user.
const is_app_landing_page = window.url_paths[0] === 'app' && !!window.url_paths[1];
if (
!window.is_auth() &&
(!window.first_visit_ever || window.disable_temp_users)
(!window.first_visit_ever || window.disable_temp_users || is_app_landing_page)
) {
// `npm start --server=<remote>` serves this GUI locally while pointing
// `gui_origin` at a remote Puter. There is nothing here to log into: