Add serverUrl to login command
wyldmagic-joshua opened this issue · 3 comments
Description
When generating an App Portal Url an accessToken and a serverUrl are required to be set. Performing the command below without setting the serverUrl results in a 401 response.
$ svix authentication dashboard "appId"
{
"code": "authentication_failed",
"detail": "Invalid token. Have you set the correct server URL?"
}
Current
Running svix login
command queries for token and adds/sets it to the config.toml. It does not ask for a serverUrl. server_url can however be set manually within config.toml
Proposal
-
Update docs to include
export SVIX_SERVER_URL='THE_SERVER_URL'
-
Enhance
svix login
to ask for optional serverUrl. Whether provided or not, server_url within the config.toml should also be set.
See Slack conversation for reference
Just copying over a small comment from Slack:
we probably want to have a default value if left empty (I assume you also thought of that).
@tasn , I remember when I first created a Svix Environment, my serverUrl didn't have a region identifier. Not sure if 'legacy' serverUrls need to be considered here.
Yeah, @IAmArchaic, that's my comment above about having a default value that is set to legacy. :)