feat: integrate Bereketli via iframe with Supabase token bridge

B2B button now opens Bereketli (bereketli.pezkiwi.app) embedded in an
iframe. PWAP exchanges the user's Supabase JWT for a Bereketli JWT
via the existing /v1/auth/exchange endpoint, then passes tokens to
the iframe via postMessage. User never sees a login screen.

- New /bereketli route (ProtectedRoute)
- Token caching in localStorage (10 min TTL)
- Camera + geolocation permissions on iframe
- Desktop and mobile layouts supported
- Re-auth on token expiry via postMessage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-08 02:23:27 +03:00
parent d475861dd6
commit 841fcdbf54
3 changed files with 171 additions and 1 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ const APP_SECTIONS: AppSection[] = [
{ title: 'mobile.app.bank', icon: '🏦', route: '/wallet', comingSoon: true },
{ title: 'mobile.app.exchange', icon: '💱', route: '/dex', requiresAuth: true },
{ title: 'mobile.app.p2p', icon: '🤝', route: '/p2p', requiresAuth: true },
{ title: 'mobile.app.b2b', icon: '🤖', route: '/wallet', comingSoon: true },
{ title: 'mobile.app.b2b', icon: '🤖', route: '/bereketli', requiresAuth: true },
{ title: 'mobile.app.bacZekat', icon: '💰', route: '/wallet', comingSoon: true },
{ title: 'mobile.app.launchpad', icon: '🚀', route: '/launchpad' },
],