Skip to content

Commit

Permalink
[HOS-373][HOS-372]Logout should not open the browser (#4475)
Browse files Browse the repository at this point in the history
* Logout should not open the browser

* check user login first before deploy
  • Loading branch information
ElijahAhianyo authored and masenf committed Dec 5, 2024
1 parent 3219157 commit da4599f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions reflex/reflex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit da4599f

Please sign in to comment.