The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fix jwt auth guard for application (#18234)
Paul Rastoin98d67e0f6ba9
diff --git a/packages/twenty-server/src/engine/guards/jwt-auth.guard.ts b/packages/twenty-server/src/engine/guards/jwt-auth.guard.tsindex a565f4b9a7c..917ba545262 100644--- a/packages/twenty-server/src/engine/guards/jwt-auth.guard.ts+++ b/packages/twenty-server/src/engine/guards/jwt-auth.guard.ts@@ -32,9 +32,13 @@ export class JwtAuthGuard implements CanActivate {): undefined;- if (!isDefined(data.apiKey) && !isDefined(data.userWorkspaceId)) {+ if (+ !isDefined(data.apiKey) &&+ !isDefined(data.userWorkspaceId) &&+ !isDefined(data.application)+ ) {this.logger.warn(- `Auth failed: no apiKey or userWorkspaceId in context`,+ `Auth failed: no apiKey, userWorkspaceId, or application in context`,);return false;