You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -85,21 +86,40 @@ The library behaves just like the Fly CLI tool regarding all default values.
85
86
86
87
For any command you run, your local `flyctl` installation will be verified. If it's not present, the command will abort with exception.
87
88
88
-
### Create a Fly instance
89
+
> [!TIP]
90
+
> Instead of `flyctl` you can also use `fly` if preferred.
91
+
92
+
### Authentication
93
+
94
+
Supported authentication methods to Fly.io in order:
95
+
96
+
1. authenticate locally via `flyctl auth login`
97
+
2. provide a token when creating the Fly instance
98
+
3. set access token environment variable `FLY_ACCESS_TOKEN`
99
+
4. set API token environment variable `FLY_API_TOKEN`
100
+
101
+
> [!NOTE]
102
+
> See [Fly Docs about security tokens](https://fly.io/docs/security/tokens/) for more details.
103
+
104
+
**Flaky `--access-token` flag**
105
+
106
+
From version **0.3.210** the access token flag has a regression, reported in <https://github.com/superfly/flyctl/issues/4648>.
89
107
90
-
Fly will try to connect to Fly.io in the following order:
108
+
> [!IMPORTANT]
109
+
> To avoid pinning a previous version, this library no longer relies on the `--access-token` flag.
110
+
> When a token is provided to the Fly instance, the library will set `FLY_ACCESS_TOKEN` internally.
111
+
>
112
+
> This legitimate workaround might change depending on how the Fly team responds to the issue. The intention is to handle this internally without affecting the library api.
91
113
92
-
1. A user has already authenticated locally using `flyctl auth login`
93
-
2. The library authenticates using the provided Fly API `token`
94
-
3. The library authenticates using environment variable `FLY_API_TOKEN`
| `authStrategy` | Authentication strategy: `'user-first'` (default) checks local authenticated user first and `'token-first'` checks provided token first. |
138
-
| `app` or `config` | Name of the application or the path to the fly configuration file to run all commands on. |
139
-
| `org` | Target organisation for your created apps. Defaults to your personal organisation. |
140
-
| `region` | Target region for your deployed apps. Defaults to auto-detect the fastest location. |
141
-
| `logger` | Custom logger for the library. Defaults to using `console.log()` and `console.error()`. CLI tracing can be enabled when needed. |
0 commit comments