We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4d51ef commit ab695c8Copy full SHA for ab695c8
apps/sim/app/api/auth/oauth/credentials/route.ts
@@ -113,7 +113,12 @@ export async function GET(request: NextRequest) {
113
114
let accountsData
115
116
- if (credentialId) {
+ if (credentialId && workflowId) {
117
+ // When both workflowId and credentialId are provided, fetch by ID only.
118
+ // Workspace authorization above already proves access; the credential
119
+ // may belong to another workspace member (e.g. for display name resolution).
120
+ accountsData = await db.select().from(account).where(eq(account.id, credentialId))
121
+ } else if (credentialId) {
122
accountsData = await db
123
.select()
124
.from(account)
0 commit comments