From c804bf5780b41d88f80f26c25f68397dc08b1e71 Mon Sep 17 00:00:00 2001 From: Ginger Date: Thu, 28 May 2026 10:51:27 -0400 Subject: [PATCH] fix: Force trusted flow UI for first-run registration --- src/web/pages/account/register.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/web/pages/account/register.rs b/src/web/pages/account/register.rs index fbd200392..529901ef4 100644 --- a/src/web/pages/account/register.rs +++ b/src/web/pages/account/register.rs @@ -132,6 +132,8 @@ async fn route_register( Expect(Query(query)): Expect>, PostForm(form): PostForm, ) -> Result { + let is_first_run = services.firstrun.is_first_run(); + if session_store .get::(User::KEY) .await @@ -226,6 +228,13 @@ async fn route_register( terms, validation_errors, }, + | (_, token) if is_first_run => RegisterBody::DetailsPrompt { + username: query.username, + require_email: false, + flow: RegistrationFlowParameters::Trusted { registration_token: token }, + terms, + validation_errors, + }, | (Some(RequestedRegistrationFlow::Untrusted), _) => RegisterBody::DetailsPrompt { username: query.username, require_email: services @@ -252,7 +261,7 @@ async fn route_register( response!(Register::new( context, services.globals.server_name().to_owned(), - services.firstrun.is_first_run(), + is_first_run, body )) }