Skip to content

fix(PRO-405): handle tgAuthResult in web and desktop#547

Merged
nvasilchuk merged 6 commits intomainfrom
fix/PRO-405-telegram-trial-oauth
Feb 17, 2026
Merged

fix(PRO-405): handle tgAuthResult in web and desktop#547
nvasilchuk merged 6 commits intomainfrom
fix/PRO-405-telegram-trial-oauth

Conversation

@mois-ilya
Copy link
Copy Markdown
Contributor

@mois-ilya mois-ilya commented Feb 2, 2026

Problem

After Telegram OAuth redirect, popup window with tgAuthResult didn't send data back to opener via postMessage. This caused "Telegram connection failed" error. Also, trial activation endpoint was failing with "public_key required" due to missing authorization header.

Changes

OAuth postMessage fix

  • Add sendTgAuthResultToOpener() to @tonkeeper/core (shared between web and desktop)
  • Use the function in web/desktop entry points to send auth result via postMessage
  • Add comment explaining allowedHosts in vite.config.mts
  • Add comment explaining why withCredentials = false in desktop telegram-widget.js (Electron manages cookies separately)

Trial activation fix

  • Add authorization header to /api/v1/services/pro/trial endpoint
  • Pass auth token from subscriptionService.getToken() to TiersService.activateTrial()

CI fix

  • Migrate macOS runners from deprecated macos-13 to macos-15-intel (x64) and macos-latest (arm64/universal)

Status

  • ✅ Web: tested, OAuth works
  • ✅ Desktop: tested, OAuth works

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 3, 2026

Successful WEB deployment 🚀🚀🚀

Well done!
Link to test environment:
https://3f104643.tonkeeper-web.pages.dev

@mois-ilya mois-ilya force-pushed the fix/PRO-405-telegram-trial-oauth branch from 9af882a to fb375d6 Compare February 3, 2026 10:19
@mois-ilya mois-ilya marked this pull request as ready for review February 3, 2026 11:00
@Anonym-tsk
Copy link
Copy Markdown

lgtm

@nvasilchuk nvasilchuk self-requested a review February 10, 2026 12:26
@github-actions
Copy link
Copy Markdown

Successful iPad build 🚀🚀🚀

Well done!
The app with build version: 4.3.5(1)
Uploaded to TestFlight

@nvasilchuk nvasilchuk merged commit aa6c03f into main Feb 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants