Skip to content

Commit f281797

Browse files
docs(auth): add manual OAuth client and browser consent guidance (#29)
* docs(auth): add manual OAuth client/browser guidance * docs(auth): use canonical Cloud Console URLs for OAuth consent/credentials Update the OAuth setup section to use the canonical, stable Cloud Console URLs as suggested in Gemini review (PR #29): - /auth/overview → /apis/credentials/consent (matches the actual page title) - /auth/clients → /apis/credentials (more direct, avoids redirect)
1 parent 214fc18 commit f281797

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.changeset/461e1845e9c8.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@googleworkspace/cli": patch
3+
---
4+
5+
docs(auth): add manual Google Cloud OAuth client setup and browser-assisted login guidance
6+
7+
Adds step-by-step guidance for creating a Desktop OAuth client in Google Cloud Console,
8+
where to place `client_secret.json`, and how humans/agents can complete browser consent
9+
(including unverified app and scope-selection prompts).

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,37 @@ gws auth login # subsequent logins
9898

9999
> Requires the [`gcloud` CLI](https://cloud.google.com/sdk/docs/install) to be installed and authenticated.
100100
101+
### Manual OAuth setup (Google Cloud Console)
102+
103+
Use this when `gws setup` cannot automate project/client creation, or when you want explicit control.
104+
105+
1. Open Google Cloud Console in the target project:
106+
- OAuth consent screen: `https://console.cloud.google.com/apis/credentials/consent?project=<PROJECT_ID>`
107+
- Credentials: `https://console.cloud.google.com/apis/credentials?project=<PROJECT_ID>`
108+
2. Configure OAuth branding/audience if prompted:
109+
- App type: **External** (testing mode is fine)
110+
- Add your account under **Test users**
111+
3. Create an OAuth client:
112+
- Type: **Desktop app**
113+
4. Download the client JSON and save it to:
114+
- `~/.config/gws/client_secret.json`
115+
116+
Then run:
117+
118+
```bash
119+
gws auth login
120+
```
121+
122+
### Browser-assisted auth (human or agent)
123+
124+
You can complete OAuth either manually or with browser automation.
125+
126+
- **Human flow**: run `gws auth login`, open the printed URL, approve scopes.
127+
- **Agent-assisted flow**: the agent opens the URL, selects account, handles consent prompts, and returns control once the localhost callback succeeds.
128+
129+
If consent shows **"Google hasn't verified this app"** (testing mode), click **Continue**.
130+
If scope checkboxes appear, select required scopes (or **Select all**) before continuing.
131+
101132
### Headless / CI (export flow)
102133

103134
1. Complete interactive auth on a machine with a browser.

0 commit comments

Comments
 (0)