Description
Is your feature request related to a problem? Please describe.
When any command which requires authentication is executed and there are no existing profiles, and FASTLY_API_TOKEN
is not available, the CLI prompts the user to launch a web browser to complete authentication.
If the user chooses to proceed, they get an error:
ERROR: the profile 'user' does not exist.
Run `fastly profile create <NAME>` to create a profile, or `fastly profile list` to view available profiles (at least one profile should be set as 'default').
Describe the solution you'd like
If there are no profiles, the CLI should allow the authentication process to proceed, and if it successful create a profile named user
with the authentication details. That profile should be set as the default. The effect should be the same as if the user had run fastly profile create --sso
.
Describe alternatives you've considered
The current situation could be addressed via documentation, but it's not a smooth flow for new users, especially since fastly profile create
defaults to API token-based authentication.