Skip to content

Commit

Permalink
feat: auto open browser when call authorize
Browse files Browse the repository at this point in the history
  • Loading branch information
Romazes committed Jul 18, 2024
1 parent eb21466 commit 7268ea0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lean/components/api/auth0_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ def authorize(brokerage_id: str, logger: Logger) -> None:
:param brokerage_id: the id of the brokerage to start the authorization process for
:param logger: the logger instance to use
"""
from webbrowser import open

full_url = f"{API_BASE_URL}live/auth0/authorize?brokerage={brokerage_id}"
logger.info(f"Please open the following URL in your browser to authorize the LEAN CLI.")
logger.info(full_url)
open(full_url)


0 comments on commit 7268ea0

Please sign in to comment.