diff --git a/flytekit/clients/auth/authenticator.py b/flytekit/clients/auth/authenticator.py index f67234f370..b2b82831c7 100644 --- a/flytekit/clients/auth/authenticator.py +++ b/flytekit/clients/auth/authenticator.py @@ -4,6 +4,8 @@ from abc import abstractmethod from dataclasses import dataclass +import click + from . import token_client from .auth_client import AuthorizationClient from .exceptions import AccessTokenNotFoundError, AuthenticationError @@ -255,11 +257,8 @@ def refresh_credentials(self): resp = token_client.get_device_code( self._device_auth_endpoint, self._client_id, self._audience, self._scope, self._http_proxy_url, self._verify ) - print( - f""" -To Authenticate navigate in a browser to the following URL: {resp.verification_uri} and enter code: {resp.user_code} - """ - ) + text = f"To Authenticate, navigate in a browser to the following URL: {click.style(resp.verification_uri, fg='blue', underline=True)} and enter code: {click.style(resp.user_code, fg='blue')}" + click.secho(text) try: # Currently the refresh token is not retreived. We may want to add support for refreshTokens so that # access tokens can be refreshed for once authenticated machines