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
docs: Document spice cloud login subcommands and OAuth2 client credentials
Add documentation for the restructured spice cloud login command
including subscription (browser-based), pat (personal access token),
and api (OAuth2 client credentials) authentication methods, along
with environment variable support.
Copy file name to clipboardExpand all lines: website/docs/cli/reference/login.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,3 +45,62 @@ spice login
45
45
```shell
46
46
spice login --key <API_KEY>
47
47
```
48
+
49
+
## `spice cloud login`
50
+
51
+
Authenticate with the Spice Cloud Platform. Running `spice cloud login` without a subcommand opens an interactive method chooser when stdin is a TTY. Non-interactive callers must specify a method explicitly.
52
+
53
+
### Methods
54
+
55
+
#### `spice cloud login subscription`
56
+
57
+
Browser-based OAuth login flow. Automatically opens a browser for authentication.
58
+
59
+
```shell
60
+
spice cloud login subscription
61
+
```
62
+
63
+
Use `--device` to print the URL and one-time code without opening a browser (useful for SSH/headless environments):
64
+
65
+
```shell
66
+
spice cloud login subscription --device
67
+
```
68
+
69
+
#### `spice cloud login pat`
70
+
71
+
Authenticate with a personal access token.
72
+
73
+
```shell
74
+
spice cloud login pat --token <TOKEN>
75
+
```
76
+
77
+
The token can also be provided via the `SPICE_CLOUD_PAT` environment variable:
78
+
79
+
```shell
80
+
export SPICE_CLOUD_PAT=<TOKEN>
81
+
spice cloud login pat
82
+
```
83
+
84
+
#### `spice cloud login api`
85
+
86
+
Authenticate using OAuth2 client credentials for CI/automation workflows.
87
+
88
+
```shell
89
+
spice cloud login api --client-id <CLIENT_ID> --client-secret <CLIENT_SECRET>
90
+
```
91
+
92
+
Credentials can also be provided via environment variables:
93
+
94
+
```shell
95
+
export SPICE_CLOUD_CLIENT_ID=<CLIENT_ID>
96
+
export SPICE_CLOUD_CLIENT_SECRET=<CLIENT_SECRET>
97
+
spice cloud login api
98
+
```
99
+
100
+
### Environment Variables
101
+
102
+
| Variable | Used by | Description |
103
+
| --- | --- | --- |
104
+
|`SPICE_CLOUD_PAT`|`login pat`| Personal access token |
105
+
|`SPICE_CLOUD_CLIENT_ID`|`login api`| OAuth2 client ID |
0 commit comments