From 9227392e9d8c42ab4cce488d4fcf43a6a147cec5 Mon Sep 17 00:00:00 2001 From: TylerC Date: Tue, 26 May 2026 08:52:48 +0800 Subject: [PATCH] feat: update Telegram Flask client IDs (#30578) ## **Description** Updates Telegram OAuth client IDs for Flask builds in development, UAT, and production so each environment points to the deployed Telegram app configuration. Adds a config test that pins the deployed Flask Telegram client IDs and catches accidental drift. ## **Changelog** CHANGELOG entry: Fixed Telegram login configuration for Flask builds ## **Related issues** Refs: No linked issue. Configuration update for deployed Flask Telegram client IDs. ## **Manual testing steps** ```gherkin Feature: Telegram login client ID configuration Scenario: Flask Telegram client IDs are pinned Given the OAuth login handler config tests are run When the Telegram Flask client ID assertions execute Then the dev, UAT, and production Flask client IDs match the deployed Telegram app IDs ``` Test command: ```bash yarn jest app/core/OAuthService/OAuthLoginHandlers/config.test.ts ``` ## **Screenshots/Recordings** N/A - configuration-only change with no UI surface. ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. #### Performance checks (if applicable) N/A - configuration-only OAuth client ID update. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- app/core/OAuthService/OAuthLoginHandlers/config.test.ts | 6 ++++++ app/core/OAuthService/OAuthLoginHandlers/config.ts | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/core/OAuthService/OAuthLoginHandlers/config.test.ts b/app/core/OAuthService/OAuthLoginHandlers/config.test.ts index 59bbc3f52a9..0a35acdc39e 100644 --- a/app/core/OAuthService/OAuthLoginHandlers/config.test.ts +++ b/app/core/OAuthService/OAuthLoginHandlers/config.test.ts @@ -21,4 +21,10 @@ describe('OAuth handler config', () => { expect(config.TELEGRAM_CLIENT_ID).toBeTruthy(); }); }); + + it('uses Telegram Flask client ids for each deployed environment', () => { + expect(OAUTH_CONFIG.flask_dev.TELEGRAM_CLIENT_ID).toBe('8935500495'); + expect(OAUTH_CONFIG.flask_uat.TELEGRAM_CLIENT_ID).toBe('8490765053'); + expect(OAUTH_CONFIG.flask_prod.TELEGRAM_CLIENT_ID).toBe('8510781700'); + }); }); diff --git a/app/core/OAuthService/OAuthLoginHandlers/config.ts b/app/core/OAuthService/OAuthLoginHandlers/config.ts index 404544c0bae..cae5d802eb5 100644 --- a/app/core/OAuthService/OAuthLoginHandlers/config.ts +++ b/app/core/OAuthService/OAuthLoginHandlers/config.ts @@ -142,7 +142,7 @@ export const OAUTH_CONFIG: Record = { ANDROID_GOOGLE_SERVER_CLIENT_ID: '795351133007-gh67d3hot6ib24htu9d7sh01bg90lpdu.apps.googleusercontent.com', ANDROID_APPLE_CLIENT_ID: 'io.metamask.appleloginclient.flask.prod', - TELEGRAM_CLIENT_ID: '8775377623', + TELEGRAM_CLIENT_ID: '8510781700', GOOGLE_GROUPED_AUTH_CONNECTION_ID: 'mm-google-flask-main', APPLE_GROUPED_AUTH_CONNECTION_ID: 'mm-apple-flask-main', @@ -167,7 +167,7 @@ export const OAUTH_CONFIG: Record = { ANDROID_GOOGLE_SERVER_CLIENT_ID: '387141446914-f03k9ivc2jrmi1s53lne88mh529372kj.apps.googleusercontent.com', ANDROID_APPLE_CLIENT_ID: 'io.metamask.appleloginclient.flask.uat', - TELEGRAM_CLIENT_ID: '8645620447', + TELEGRAM_CLIENT_ID: '8490765053', GOOGLE_GROUPED_AUTH_CONNECTION_ID: 'mm-google-flask-uat', APPLE_GROUPED_AUTH_CONNECTION_ID: 'mm-apple-flask-uat', @@ -192,7 +192,7 @@ export const OAUTH_CONFIG: Record = { ANDROID_GOOGLE_SERVER_CLIENT_ID: '615965109465-ab20kuqbls6fj5s50fvmvbnket8nv1sh.apps.googleusercontent.com', ANDROID_APPLE_CLIENT_ID: 'io.metamask.appleloginclient.flask.dev', - TELEGRAM_CLIENT_ID: '8648706996', + TELEGRAM_CLIENT_ID: '8935500495', GOOGLE_GROUPED_AUTH_CONNECTION_ID: 'mm-google-flask-dev', APPLE_GROUPED_AUTH_CONNECTION_ID: 'mm-apple-flask-dev',