Root cause: on GrapheneOS, Amber opens /amber-callback in a BRAND NEW TAB.
login.amber() was being called in that new tab's React instance, which has
no effect on the original tab where the user is waiting.
Fix:
- AmberCallbackPage now writes pubkey to localStorage('amber_pending_pubkey')
instead of calling login.amber() — a cross-tab signal
- LoginDialog polls for 'amber_pending_pubkey' every 400ms and calls
login.amber() itself in the correct React context
- Manual "I approved" button also reads the same key
- Removed reliance on getAmberLogin() which checked the wrong localStorage key
Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
|
||
|---|---|---|
| .. | ||
| components | ||
| contexts | ||
| hooks | ||
| i18n | ||
| lib | ||
| pages | ||
| test | ||
| App.test.tsx | ||
| App.tsx | ||
| AppRouter.tsx | ||
| index.css | ||
| main.tsx | ||
| vite-env.d.ts | ||