Pin the two rules that let an OAuth grant and typed-in DAV credentials share a row

TestEmailService
Shipped
September 5, 2026 at 6:34 AM UTC
Author
Kamo
Commit
b80d7f1

An org-level ContactIntegration holds either a typed-in DAV URL and password or an OAuth grant, and the CalDAV/CardDAV tab writes to that one row from two independent places: the Save button and the OAuth callback. Neither rule about what each write may touch is visible in the type system, and breaking either is silent: - Save sends no credentialsJson for Google or Microsoft, because there is nothing for a member to type. If an absent (or blank) key were ever read as "clear it", pressing Save on this screen would revoke every OAuth connection in the platform and show a Connect button where a working one had been. - Disconnect clears the grant through clearOrgCredentials rather than deleting the row, so the calendars/contacts and two-way-sync choices survive it. Deleting would quietly reset them to defaults on the next connect. Also covers the bidirectional/bidirectionalSync spelling both ways, and that a row written under a rotated key reads as "no credential" instead of failing the settings screen that would let the member reconnect.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing