From 3f640a680c617126f964a0aec7bea07f7432924b Mon Sep 17 00:00:00 2001 From: Honzapat_CZ Date: Tue, 12 Nov 2024 19:18:40 +0100 Subject: [PATCH 1/2] Rename old TWITTER_CLIENT_ID to new X_CLIENT_ID --- .../nestjs-libraries/src/integrations/social/x.provider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts index 8bc9f0ac0..31bee1cd1 100644 --- a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts +++ b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts @@ -19,8 +19,8 @@ export class XProvider extends SocialAbstract implements SocialProvider { async refreshToken(refreshToken: string): Promise { const startingClient = new TwitterApi({ - clientId: process.env.TWITTER_CLIENT_ID!, - clientSecret: process.env.TWITTER_CLIENT_SECRET!, + clientId: process.env.X_CLIENT_ID!, + clientSecret: process.env.X_CLIENT_SECRET!, }); const { accessToken, From 2450bd47d9fc610912fe4cb6a0a6d5ce7ed27471 Mon Sep 17 00:00:00 2001 From: Honzapat_CZ Date: Mon, 18 Nov 2024 14:54:44 +0100 Subject: [PATCH 2/2] Backwards compatibility --- .../nestjs-libraries/src/integrations/social/x.provider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts index 31bee1cd1..63e59041f 100644 --- a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts +++ b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts @@ -19,8 +19,8 @@ export class XProvider extends SocialAbstract implements SocialProvider { async refreshToken(refreshToken: string): Promise { const startingClient = new TwitterApi({ - clientId: process.env.X_CLIENT_ID!, - clientSecret: process.env.X_CLIENT_SECRET!, + clientId: process.env.TWITTER_CLIENT_ID! || process.env.X_CLIENT_ID!, + clientSecret: process.env.TWITTER_CLIENT_SECRET! || process.env.X_CLIENT_SECRET!, }); const { accessToken,