SkateSpots/src/components/auth
shakespeare.diy 65914303f1 Fix Amber login for PWA installed to home screen
PWA standalone mode is single-tab. Opening nostrsigner: with a callbackUrl
sends the callback to the browser (a different app), not back to the PWA.
The PWA tab is suspended and never sees the result.

Fix:
- Detect PWA standalone mode via matchMedia('(display-mode: standalone)')
- In PWA mode: open Amber WITHOUT a callbackUrl — Amber copies pubkey to
  clipboard automatically when no callback is given
- Use visibilitychange to detect when user returns to PWA after approving
- Auto-read clipboard on return and complete login silently
- Manual "I approved" button now tries localStorage first (browser), then
  falls back to clipboard read (PWA) — covers both contexts with one button
- Browser mode unchanged: localStorage cross-tab polling still works

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-06-17 23:04:48 +07:00
..
AccountSwitcher.tsx fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
AmberCallbackHandler.tsx fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
LoginArea.tsx fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
LoginDialog.tsx Fix Amber login for PWA installed to home screen 2026-06-17 23:04:48 +07:00
MnemonicSignupDialog.tsx fix: remove orphaned canvas code from RiderCardPage causing ctx/Printer is not defined crash 2026-06-16 17:02:59 +07:00
SignupDialog.tsx fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
SignupMethodDialog.tsx fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00