mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-06-17 16:40:31 +00:00
Make the mobile login page Lightning-only
The Nostr login is now driven entirely by the app (it launches the NIP-55 signer via an ACTION_VIEW intent and posts the signed event to /auth/mobile/signed), so the portal page no longer needs window.nostr or an Amber button — it only renders the Lightning QR. The path-based signer callback and token exchange endpoints remain server-side.
This commit is contained in:
@@ -201,27 +201,6 @@ it('lets an already authenticated user connect the app and replaces tokens of th
|
||||
expect($user->tokens()->where('name', 'Pixel 10')->count())->toBe(1);
|
||||
});
|
||||
|
||||
it('completes a window.nostr login on the mobile page via LoginKey and the completion route', function () {
|
||||
Queue::fake();
|
||||
|
||||
$component = Livewire\Livewire::withQueryParams(['redirect_uri' => 'einundzwanzig://auth', 'device_name' => 'Pixel 10'])
|
||||
->test('auth.mobile-login');
|
||||
|
||||
// Helper from NostrLoginTest: signs the challenge stored in the session.
|
||||
[$signedEvent, $npub] = makeSignedNostrLoginEvent();
|
||||
|
||||
$k1 = $component->get('k1');
|
||||
|
||||
$component
|
||||
->dispatch('nostrLoggedIn', signedEvent: $signedEvent)
|
||||
->assertRedirect(route('auth.mobile.complete', ['k1' => $k1]));
|
||||
|
||||
$user = User::query()->where('nostr', $npub)->first();
|
||||
expect($user)->not->toBeNull();
|
||||
expect(LoginKey::query()->where('k1', $k1)->value('user_id'))->toBe($user->id);
|
||||
Queue::assertPushed(FetchNostrProfileJob::class);
|
||||
});
|
||||
|
||||
it('shows the confirmation screen instead of the login methods for authenticated users', function () {
|
||||
$user = User::factory()->create();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user