feat(quickbooks): add QuickBooks Online integration#4452
feat(quickbooks): add QuickBooks Online integration#4452waleedlatif1 wants to merge 6 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Introduces a QuickBooks OAuth provider with Implements a new QuickBooks block and tool suite ( Reviewed by Cursor Bugbot for commit d026d58. Configure here. |
Greptile SummaryThis PR adds a full QuickBooks Online integration: 22 tools covering customers, invoices, vendors, bills, payments, items, accounts, estimates, and a raw query escape-hatch. It wires a custom Intuit OAuth provider into Better Auth using a cookie-based realmId relay (
Confidence Score: 5/5Safe to merge — the OAuth flow, realmId relay, token extraction, and all 22 tool implementations are logically sound; previously flagged issues have been addressed. The cookie-based realmId capture is correctly ordered (set before Better Auth processes the callback, read in getUserInfo and the two hooks, deleted in update.after). All tools guard against missing realmId and accessToken at runtime. The only open items are a missing try/catch around JSON.parse in coerceJsonArray and an implicit same-company-only update constraint in account.update.after — neither affects correctness for the expected usage paths. No files require special attention; the most complex logic is in auth.ts around the hook ordering, which is correctly sequenced. Important Files Changed
Reviews (5): Last reviewed commit: "fix(quickbooks): strip string literals b..." | Re-trigger Greptile |
…tion, send body, query description)
|
@greptile |
|
@cursor review |
…ired in description
|
@greptile |
|
@cursor review |
|
@greptile |
|
@cursor review |
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
@cursor review |
|
@greptile |
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d026d58. Configure here.
| return null | ||
| } | ||
| return { | ||
| id: `quickbooks-${realmId}`, |
There was a problem hiding this comment.
Missing unique ID suffix breaks account deduplication
High Severity
The QuickBooks getUserInfo returns id: \quickbooks-${realmId}`without appending-${generateId()}, unlike every other OAuth provider (Google, HubSpot, etc.). The account.create.afterhook's deduplication logic depends on a UUID suffix to identify stale accounts — it strips the UUID viaUUID_SUFFIX_REto find the stable prefix, then only runs migration whenstablePrefix !== account.accountId. Without the suffix, those are always equal, so stale account cleanup never fires. This also means Better Auth may block re-connections or cross-user connections to the same QuickBooks company because the accountId` collides.
Reviewed by Cursor Bugbot for commit d026d58. Configure here.


Summary
Type of Change
Testing
Tested manually
Checklist