From 6a63c1fffdaa2ee1f94d4c184c79511b73a8cce0 Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Tue, 26 Mar 2024 00:24:53 -0400 Subject: [PATCH] Makes the deviceflow auth URL simplier (#2293) Signed-off-by: Thomas J. Fan --- flytekit/clients/auth/authenticator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flytekit/clients/auth/authenticator.py b/flytekit/clients/auth/authenticator.py index fdf1d13eae..0ed780509e 100644 --- a/flytekit/clients/auth/authenticator.py +++ b/flytekit/clients/auth/authenticator.py @@ -302,7 +302,9 @@ def refresh_credentials(self): self._verify, self._session, ) - 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')}" + + full_uri = f"{resp.verification_uri}?user_code={resp.user_code}" + text = f"To Authenticate, navigate in a browser to the following URL: {click.style(full_uri, fg='blue', underline=True)}" click.secho(text) try: # Currently the refresh token is not retrieved. We may want to add support for refreshTokens so that