From 109c779f7ca5aab482051f2c638fd26e2ecc0b5a Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 27 Nov 2024 16:14:12 -0800 Subject: [PATCH] [ENG-4149] require login to deploy template --- reflex/utils/prerequisites.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 44ed908436..559f668a1d 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -1408,6 +1408,15 @@ def validate_and_create_app_using_remote_template(app_name, template, templates) """ # If user selects a template, it needs to exist. if template in templates: + from reflex_cli.v2.utils import hosting + + authenticated_token = hosting.authenticated_token() + if not authenticated_token or not authenticated_token[0]: + console.print( + f"Please use `reflex loginv2` to access the '{template}' template." + ) + raise typer.Exit(3) + template_url = templates[template].code_url else: # Check if the template is a github repo.