From be1dcc116e1092968319c1cc9cd74ad707b843fe Mon Sep 17 00:00:00 2001 From: Chakravarthy7102 Date: Thu, 28 Sep 2023 12:24:16 +0530 Subject: [PATCH] fix: use twitter as twitter providers Id (#746) * fix: use twitter as twitter providers Id * update changelog and bump version * update changelog * incorporate suggested changes * update code --- CHANGELOG.md | 6 ++++++ lib/build/thirdparty-shared.js | 5 ++--- lib/build/version.d.ts | 2 +- lib/ts/recipe/thirdparty/providers/twitter.tsx | 5 ++--- lib/ts/version.ts | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 7 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87e692921..da7a4f26a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated dev/start script in netlify example +## [0.35.4] - 2023-09-28 + +### Fixes + +- fixed using `twitter` as id by default in twitter provider. + ## [0.35.3] - 2023-09-26 ### Added diff --git a/lib/build/thirdparty-shared.js b/lib/build/thirdparty-shared.js index 828d7dc14..d88cf5dee 100644 --- a/lib/build/thirdparty-shared.js +++ b/lib/build/thirdparty-shared.js @@ -1012,15 +1012,14 @@ var Twitter = /** @class */ (function (_super) { */ function Twitter(config) { var _this = this; - var id = "x"; var name = "X"; var normalisedUseLegacyTwitterLogo = (config === null || config === void 0 ? void 0 : config.useLegacyTwitterLogo) === true; if (normalisedUseLegacyTwitterLogo) { - id = "twitter"; name = "Twitter"; } - _this = _super.call(this, genericComponentOverrideContext.__assign({ id: id, name: name }, config)) || this; + _this = + _super.call(this, genericComponentOverrideContext.__assign({ id: "twitter", name: name }, config)) || this; _this.useLegacyTwitterLogo = false; _this.getLogo = function () { if (_this.useLegacyTwitterLogo === true) { diff --git a/lib/build/version.d.ts b/lib/build/version.d.ts index 08244704e..4d6e79bf1 100644 --- a/lib/build/version.d.ts +++ b/lib/build/version.d.ts @@ -1 +1 @@ -export declare const package_version = "0.35.3"; +export declare const package_version = "0.35.4"; diff --git a/lib/ts/recipe/thirdparty/providers/twitter.tsx b/lib/ts/recipe/thirdparty/providers/twitter.tsx index aaeacbc00..5167bc531 100644 --- a/lib/ts/recipe/thirdparty/providers/twitter.tsx +++ b/lib/ts/recipe/thirdparty/providers/twitter.tsx @@ -39,17 +39,16 @@ export default class Twitter extends Provider { * Constructor. */ constructor(config?: TwitterProviderConfig) { - let id = "x"; let name = "X"; + const normalisedUseLegacyTwitterLogo = config?.useLegacyTwitterLogo === true; if (normalisedUseLegacyTwitterLogo) { - id = "twitter"; name = "Twitter"; } super({ - id, + id: "twitter", name, ...config, }); diff --git a/lib/ts/version.ts b/lib/ts/version.ts index d1f657eba..b08b6a904 100644 --- a/lib/ts/version.ts +++ b/lib/ts/version.ts @@ -12,4 +12,4 @@ * License for the specific language governing permissions and limitations * under the License. */ -export const package_version = "0.35.3"; +export const package_version = "0.35.4"; diff --git a/package-lock.json b/package-lock.json index f63d95fb7..db4eba3ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "supertokens-auth-react", - "version": "0.35.3", + "version": "0.35.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "supertokens-auth-react", - "version": "0.35.3", + "version": "0.35.4", "license": "Apache-2.0", "dependencies": { "intl-tel-input": "^17.0.19", diff --git a/package.json b/package.json index 745d6503f..4038ce709 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "supertokens-auth-react", - "version": "0.35.3", + "version": "0.35.4", "description": "ReactJS SDK that provides login functionality with SuperTokens.", "main": "./index.js", "engines": {