Skip to content

Scheduling infrastructure for absolutely everyone.

fix: redis cache key overlap (#14938)

Morgan5d7b2a12a7c8
diff --git a/apps/api/v2/src/modules/oauth-clients/services/oauth-flow.service.ts b/apps/api/v2/src/modules/oauth-clients/services/oauth-flow.service.ts
index be9d4fc5557..86c8ff45bb1 100644
--- a/apps/api/v2/src/modules/oauth-clients/services/oauth-flow.service.ts
+++ b/apps/api/v2/src/modules/oauth-clients/services/oauth-flow.service.ts
@@ -40,7 +40,7 @@ export class OAuthFlowService {
}
async getOwnerId(accessToken: string) {
- const cacheKey = this._generateActKey(accessToken);
+ const cacheKey = this._generateOwnerIdKey(accessToken);
try {
const ownerId = await this.redisService.redis.get(cacheKey);
@@ -165,4 +165,8 @@ export class OAuthFlowService {
private _generateActKey(accessToken: string) {
return `act_${accessToken}`;
}
+
+ private _generateOwnerIdKey(accessToken: string) {
+ return `owner_${accessToken}`;
+ }
}