Files
crewAI/src/crewai/cli/authentication/token.py
Heitor Carvalho f96b779df5
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
feat: reset tokens on crewai config reset (#3365)
2025-08-22 16:16:42 -04:00

14 lines
333 B
Python

from crewai.cli.shared.token_manager import TokenManager
class AuthError(Exception):
pass
def get_auth_token() -> str:
"""Get the authentication token."""
access_token = TokenManager().get_token()
if not access_token:
raise AuthError("No token found, make sure you are logged in")
return access_token