fix(auth): add pexsecBot for Telegram login on app.pezkuwichain.io

- pex.mom uses @PexMomBOT (8690398980)
- app.pezkuwichain.io uses @pexsecBot (8754021997)
- Edge function selects token based on bot_id from request
This commit is contained in:
Kurdistan Tech Ministry committed 2026-05-01 23:32:25 +03:00
1 parent ef6a7b2583
commit 9babb94e07
2 files changed
+8 -6

No files matched your search

+2 -2
View File
@@ -163,7 +163,7 @@ const Login: React.FC = () => {
setError('');
setLoading(true);
const BOT_ID = '8690398980';
const BOT_ID = window.location.hostname === 'pex.mom' ? '8690398980' : '8754021997';
const origin = window.location.origin;
const popup = window.open(
`https://oauth.telegram.org/auth?bot_id=${BOT_ID}&origin=${encodeURIComponent(origin)}&embed=1&request_access=write`,
@@ -196,7 +196,7 @@ const Login: React.FC = () => {
'apikey': supabaseKey,
'Authorization': `Bearer ${supabaseKey}`,
},
body: JSON.stringify(tgData),
body: JSON.stringify({ ...tgData, bot_id: BOT_ID }),
});
const json = await res.json();