Skip to content

Commit ffaa485

Browse files
authored
docs(google): document hd claim in seed config (#79)
Follow-up to #73. Adds the hd field to Google seed config examples and explains the auto-derivation behavior for Workspace vs consumer domains.
1 parent 499ba4f commit ffaa485

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ google:
153153
users:
154154
- email: testuser@example.com
155155
name: Test User
156+
- email: admin@acme.com
157+
name: Admin
158+
hd: acme.com
156159
oauth_clients:
157160
- client_id: my-client-id.apps.googleusercontent.com
158161
client_secret: GOCSPX-secret

apps/web/app/configuration/page.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ google:
144144
users:
145145
- email: testuser@example.com
146146
name: Test User
147+
- email: admin@acme.com
148+
name: Admin
149+
hd: acme.com
147150
oauth_clients:
148151
- client_id: my-client-id.apps.googleusercontent.com
149152
client_secret: GOCSPX-secret
@@ -181,6 +184,12 @@ google:
181184
parent_ids: [root]
182185
```
183186

187+
### Hosted domain (hd) claim
188+
189+
Google Workspace accounts include an `hd` claim in ID tokens and userinfo responses identifying the user's hosted domain. The emulator derives this automatically from the user's email domain. Consumer domains (`gmail.com`, `googlemail.com`) omit the claim, matching real Google behavior.
190+
191+
To override the derived value, set `hd` on a seeded user. To suppress the claim entirely, set `hd` to an empty string.
192+
184193
## Slack Seed Config
185194

186195
```yaml

skills/google/SKILL.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ google:
116116
locale: en
117117
- email: dev@example.com
118118
name: Developer
119+
- email: admin@acme.com
120+
name: Admin
121+
hd: acme.com
119122
oauth_clients:
120123
- client_id: my-client-id.apps.googleusercontent.com
121124
client_secret: GOCSPX-secret
@@ -176,6 +179,12 @@ google:
176179
177180
When no OAuth clients are configured, the emulator accepts any `client_id`. With clients configured, strict validation is enforced for `client_id`, `client_secret`, and `redirect_uri`.
178181

182+
### Hosted domain (hd) claim
183+
184+
Google Workspace accounts include an `hd` claim in ID tokens and userinfo responses identifying the user's hosted domain. The emulator derives this automatically from the user's email domain. Consumer domains (`gmail.com`, `googlemail.com`) omit the claim, matching real Google behavior.
185+
186+
To override the derived value, set `hd` on a seeded user. To suppress the claim entirely, set `hd` to an empty string.
187+
179188
## OAuth / OIDC Endpoints
180189

181190
### OIDC Discovery

0 commit comments

Comments
 (0)