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
gog --client work auth credentials ~/Downloads/work-client.json
95
+
gog auth credentials list
96
+
```
97
+
91
98
### 3. Authorize Your Account
92
99
93
100
```bash
@@ -109,7 +116,7 @@ gog gmail labels list
109
116
110
117
`gog` stores your OAuth refresh tokens in a “keyring” backend. Default is `auto` (best available backend for your OS/environment).
111
118
112
-
Before you can run `gog auth add`, you must store OAuth client credentials once via `gog auth credentials <credentials.json>` (download a Desktop app OAuth client JSON from the Cloud Console).
119
+
Before you can run `gog auth add`, you must store OAuth client credentials once via `gog auth credentials <credentials.json>` (download a Desktop app OAuth client JSON from the Cloud Console). For multiple clients, use `gog --client <name> auth credentials ...`; tokens are isolated per client.
113
120
114
121
List accounts:
115
122
@@ -131,6 +138,52 @@ Show current auth state/services for the active account:
131
138
gog auth status
132
139
```
133
140
141
+
### Multiple OAuth clients
142
+
143
+
Use `--client` (or `GOG_CLIENT`) to select a named OAuth client:
144
+
145
+
```bash
146
+
gog --client work auth credentials ~/Downloads/work.json
@@ -122,13 +127,15 @@ We intentionally avoid storing refresh tokens in plain JSON on disk.
122
127
Environment:
123
128
124
129
-`[email protected]` (email or alias; used when `--account` is not set; otherwise uses keyring default or a single stored token)
130
+
-`GOG_CLIENT=work` (select OAuth client bucket; see `--client`)
125
131
-`GOG_KEYRING_PASSWORD=...` (used when keyring falls back to encrypted file backend in non-interactive environments)
126
132
-`GOG_KEYRING_BACKEND={auto|keychain|file}` (force backend; use `file` to avoid Keychain prompts and pair with `GOG_KEYRING_PASSWORD` for non-interactive)
127
133
-`GOG_TIMEZONE=America/New_York` (default output timezone; IANA name or `UTC`; `local` forces local timezone)
128
134
-`GOG_ENABLE_COMMANDS=calendar,tasks` (optional allowlist of top-level commands)
129
135
-`config.json` can also set `keyring_backend` (JSON5; env vars take precedence)
130
136
-`config.json` can also set `default_timezone` (IANA name or `UTC`)
131
137
-`config.json` can also set `account_aliases` for `gog auth alias` (JSON5)
138
+
-`config.json` can also set `account_clients` (email -> client) and `client_domains` (domain -> client)
0 commit comments