From 4fa4a84b7d03e2fc505693dbeab14524e7ed3e6f Mon Sep 17 00:00:00 2001 From: HolgerHatGarKeineNode <123783602+HolgerHatGarKeineNode@users.noreply.github.com> Date: Thu, 11 Jun 2026 23:28:32 +0200 Subject: [PATCH] Launch the Nostr signer via an intent:// URL with extras Amber v6.2.0 rejects a plain nostrsigner: navigation as malformed: it reads the signer parameters from intent extras, which a window.location navigation cannot set. An intent:// URL lets the launcher pass the event as the data URI plus type/returnType/appName/callbackUrl as S.* extras, so Amber accepts the request and shows its sign dialog. The query is also kept on the data URI for the EXTRA_APPLICATION_ID web flow. Note: on the emulator with Amber v6.2.0 the post-approval callback did not always fire (Amber returns via setResult when callingPackage != null); needs verification on a real device. --- .../views/auth/mobile-nostr-launch.blade.php | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/resources/views/auth/mobile-nostr-launch.blade.php b/resources/views/auth/mobile-nostr-launch.blade.php index 5608c64..1c636cb 100644 --- a/resources/views/auth/mobile-nostr-launch.blade.php +++ b/resources/views/auth/mobile-nostr-launch.blade.php @@ -8,7 +8,6 @@ body { margin: 0; min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: #09090b; color: #fafafa; font-family: ui-sans-serif, system-ui, sans-serif; } .card { text-align: center; padding: 2rem; max-width: 22rem; } - .logo { width: 5rem; height: 5rem; margin: 0 auto 1.5rem; } h1 { font-size: 1.25rem; margin: 0 0 .5rem; } p { color: #a1a1aa; line-height: 1.5; } button.launch { margin-top: 1.5rem; width: 100%; padding: 1rem 1.25rem; border: 0; border-radius: .75rem; @@ -19,16 +18,18 @@
{{ __('Tippe auf den Button, um die Anmeldung mit deinem Nostr-Signer (z. B. Amber) zu signieren.') }}
- {{-- The signer MUST be launched from a user gesture: browsers only - attach the EXTRA_APPLICATION_ID that routes Amber into its - web-signing flow when the external-app launch is user-initiated. - An auto-redirect on load is rejected by Amber as malformed. --}} + {{-- Must be launched from a user gesture (browsers only dispatch the + external-app intent on user activation). --}}