Log in to Tool Repository on crewai login (#1650)

This commit adds an extra step to `crewai login` to ensure users also
log in to Tool Repository, that is, exchanging their Auth0 tokens for a
Tool Repository username and password to be used by UV downloads and API
tool uploads.
This commit is contained in:
Vini Brasil
2024-11-25 15:57:47 -03:00
committed by GitHub
parent 9f13c8afbf
commit 6812febf0e
9 changed files with 44 additions and 22 deletions

View File

@@ -0,0 +1,10 @@
from .utils import TokenManager
def get_auth_token() -> str:
"""Get the authentication token."""
access_token = TokenManager().get_token()
if not access_token:
raise Exception()
return access_token