Skip to content

Commit

Permalink
[ENG-4149] require login to deploy template
Browse files Browse the repository at this point in the history
  • Loading branch information
masenf committed Nov 28, 2024
1 parent a97c03a commit 109c779
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions reflex/utils/prerequisites.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 109c779

Please sign in to comment.