Skip to content

Commit 8fee53d

Browse files
committed
Clarify API token login vs environment variables in README
1 parent e13ea75 commit 8fee53d

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,15 @@ Use the 'list' command to get a list of available options and commands:
5454

5555
There are two ways to authenticate:
5656

57-
1. `platform login` (AKA `platform auth:browser-login`): this opens a temporary
58-
local server and a browser, allowing you to log in to Platform.sh via the
59-
normal login form, including via third-party providers like Bitbucket, GitHub
60-
and Google.
61-
62-
2. [API tokens](https://docs.platform.sh/gettingstarted/cli/api-tokens.html):
63-
these allow non-interactive authentication. To use an API token, you can run
64-
the `platform auth:api-token-login` command. Alternatively you can supply the
65-
API token in an environment variable named `PLATFORMSH_CLI_TOKEN`.
66-
67-
*_Warning_*: An API token can act as the account that created it, with no
68-
restrictions. Use a separate machine account to limit the token's access.
57+
1. The recommended way is `platform login`, which lets you log in via a web browser, including via third-party providers such as Google, GitHub and Bitbucket.
58+
59+
2. If using a browser is not possible, use an [API token](https://docs.platform.sh/gettingstarted/cli/api-tokens.html).
60+
61+
An interactive command is available for this: `platform auth:api-token-login`
62+
63+
For non-interactive uses such as scripts or CI systems, set the API token in an environment variable named `PLATFORMSH_CLI_TOKEN`. This can be insecure if not handled properly, although it is appropriate for systems such as CircleCI, Jenkins and GitLab.
64+
65+
*_Warning_*: An API token can act as the account that created it, with no restrictions. Use a separate machine account to limit the token's access.
6966

7067
### Commands
7168

0 commit comments

Comments
 (0)