Skip to content

Commit da4599f

Browse files
ElijahAhianyomasenf
authored andcommitted
[HOS-373][HOS-372]Logout should not open the browser (#4475)
* Logout should not open the browser * check user login first before deploy
1 parent 3219157 commit da4599f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

reflex/reflex.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -398,15 +398,10 @@ def logoutv2(
398398
),
399399
):
400400
"""Log out of access to Reflex hosting service."""
401-
from reflex_cli.v2.utils import hosting
401+
from reflex_cli.v2 import cli
402402

403403
check_version()
404-
405-
console.set_log_level(loglevel)
406-
407-
hosting.log_out_on_browser()
408-
console.debug("Deleting access token from config locally")
409-
hosting.delete_token_from_config()
404+
cli.logout()
410405

411406

412407
db_cli = typer.Typer()
@@ -672,6 +667,8 @@ def deployv2(
672667

673668
# Set the log level.
674669
console.set_log_level(loglevel)
670+
# make sure user is logged in.
671+
hosting_cli.login()
675672

676673
# Only check requirements if interactive.
677674
# There is user interaction for requirements update.

0 commit comments

Comments
 (0)