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
{{ message }}
Repository navigation
Commit a7c3cad
Browse filesBrowse the repository at this point in the historyBrowse files
fix(google): allow the userinfo endpoint so sends carry a display name
The composite Google connector reuses the Gmail send path, which resolves
the account's display name from Google's userinfo endpoint to build a
`"Name" <email>` From header. That endpoint was missing from this
connector's own Network allowlist, so the outbound proxy refused the
lookup and replies and forwards went out with a bare email address as the
sender — recipients saw an address instead of a name.
Connectors declare their allowlist in `build()`, and a composite does not
inherit the allowlists of the connectors whose code it reuses. Adding the
endpoint to the standalone Gmail connector therefore left the composite
still blocked, with passing tests either side of the gap. The new test
drives the composite's real `build()` and asserts the allowlist.
Also make the fallback observable. It is deliberately best-effort so a
failed lookup never blocks a send, but two paths degraded silently:
- A 403 — the endpoint missing from the allowlist, or a grant without the
`profile` scope — logged only a generic warning. It now logs an error
naming both causes; a 403 is a misconfiguration that degrades every
send, not a transient blip.
- A 200 with no `name` claim, which is what a grant without the `profile`
scope returns, threw nothing at all and silently produced a bare
address. It now logs an error pointing at re-authorization.
`getUserInfo` throws a typed `UserInfoError` carrying the HTTP status so
callers can separate a misconfiguration from a transient failure.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments