Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
cc @joshmgross |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5f48759. Configure here.
| name: | ||
| profileWithName?.name ?? | ||
| profileWithName?.preferred_username ?? | ||
| profileWithName?.login, |
There was a problem hiding this comment.
Nullish coalescing skips fallback for empty string names
Medium Severity
The ?? (nullish coalescing) operator only falls through on null/undefined, not on empty strings. If profileWithName?.name is "" (which some OAuth providers return instead of null for unset names), the preferred_username and login fallbacks are skipped entirely. The || operator would correctly fall through for empty strings, preserving the intended fallback chain of name → preferred_username → login.
Reviewed by Cursor Bugbot for commit 5f48759. Configure here.
| where: { id: user.id }, | ||
| data: { name: fallbackName }, | ||
| }) | ||
| } |
There was a problem hiding this comment.
Unhandled DB error in signIn blocks authentication
Medium Severity
The prisma.user.update call inside the signIn callback isn't wrapped in a try-catch. If this database update fails (e.g., transient DB error), the unhandled exception propagates up and causes the entire sign-in to fail. Since the name update is a cosmetic enhancement, it shouldn't block user authentication.
Reviewed by Cursor Bugbot for commit 5f48759. Configure here.


No description provided.