[HOS-373][HOS-372]Logout should not open the browser (#4475)

* Logout should not open the browser

* check user login first before deploy
This commit is contained in:
Elijah Ahianyo 2024-12-05 02:17:22 +00:00 committed by GitHub
parent a894f21ce5
commit e23d939781
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -398,15 +398,10 @@ def logoutv2(
),
):
"""Log out of access to Reflex hosting service."""
from reflex_cli.v2.utils import hosting
from reflex_cli.v2 import cli
check_version()
console.set_log_level(loglevel)
hosting.log_out_on_browser()
console.debug("Deleting access token from config locally")
hosting.delete_token_from_config()
cli.logout()
db_cli = typer.Typer()
@ -672,6 +667,8 @@ def deployv2(
# Set the log level.
console.set_log_level(loglevel)
# make sure user is logged in.
hosting_cli.login()
# Only check requirements if interactive.
# There is user interaction for requirements update.