Skip to content

token create: don't show default localhost URL in output#841

Open
c-tonneslan wants to merge 1 commit intolivekit:mainfrom
c-tonneslan:fix/token-create-default-url
Open

token create: don't show default localhost URL in output#841
c-tonneslan wants to merge 1 commit intolivekit:mainfrom
c-tonneslan:fix/token-create-default-url

Conversation

@c-tonneslan
Copy link
Copy Markdown

Fixes #800.

The --url flag defaults to http://localhost:7880 for dev convenience, but that default was getting printed as "Project URL" in lk token create output even when the user never configured a URL. Confusing, since it implies the token is tied to that server when really it isn't.

Now we skip the "Project URL" line if the URL wasn't explicitly set. If the user passes --url or sets LIVEKIT_URL, it still shows up as before.

Before:

Project URL: http://localhost:7880
Access token: eyJ...

After (when no URL configured):

Access token: eyJ...

When no project URL is configured, the --url flag falls back to its
default of http://localhost:7880, and that default was getting printed
as "Project URL" in the token output. That's confusing since the user
didn't configure anything. Now we skip the URL line if it wasn't
explicitly set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lk token create works even though the URL is not given

1 participant